Package: nmh
Version: 1.6-2
Severity: normal

Hi,

first of all I think nmh should depend on mime-support, as it is using
run-mailcap in mhn.defaults. Yes I could file an extra bug for that, but
I know Alexander will pick this up here as well.

The actual problem:
When I mhshow a message with a text/html part on the linux virtual
terminal, the current mhn.defaults invokes "run-mailcap --action=view",
which in turn invokes sensible-browser, which on my system happens to
produce output not suitable for display in a pager - ie lots of
escape sequences.

There are a number of things going wrong in this szenario, and I'm
not sure which ones should be reported as bugs:
Involved browser shouldn't output escape sequences if not attached
to a terminal and I guess it is particularly hard to write a correct
mailcap entry for sensible-browser as it can start an application either
in X or in a terminal.

On the nmh side, mhshow probably shouldn't use --action=view if the output
is acutally displayed in a pager. I changed this to --action=cat and
got the correct behavior. However this has a side effect: Under X the
message is still shown in a pager and not in a browser window. I like the
side effect, but if this is not desired then maybe something like
--action=$(if test $DISPLAY; then echo view; else echo cat; fi) or
a wrapper is necessary.

HTH,
Harald

-- System Information:
Debian Release: 8.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.16.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages nmh depends on:
ii  libc6         2.19-18+deb8u1
ii  libdb5.3      5.3.28-9
ii  liblockfile1  1.09-6
ii  libsasl2-2    2.1.26.dfsg1-13+deb8u1
ii  libssl1.0.0   1.0.1k-3+deb8u1
ii  libtinfo5     5.9+20140913-1+b1
ii  netbase       5.3

Versions of packages nmh recommends:
ii  exim4-daemon-light [mail-transport-agent]  4.84-8

Versions of packages nmh suggests:
pn  exmh                <none>
ii  libmailtools-perl   2.13-1
ii  libmime-tools-perl  5.505-1
pn  mh-book             <none>
pn  mh-e                <none>
ii  par                 1.52-3

-- Configuration Files:
/etc/nmh/mhl.headers changed:
; mhl.headers
;
; Default format file for displaying headers in
; MIME messages.  mhn calls the mhlproc with this
; filter to display message header.
;
overflowtext="***",overflowoffset=5
leftadjust,compwidth=9
ignores=msgid,message-id,received,content-type,content-transfer-encoding,content-id,x-ui-filterresults,dkim-signature,x-spam-report
Date:formatfield="%<(nodate{text})%{text}%|%(pretty{text})%>"
To:
cc:
From:decode
Subject:decode
:
extras:nocomponent
:

/etc/nmh/mhl.reply changed:
; mhl.reply
;
; default message filter for `repl' (repl -format)
;
;from:nocomponent,formatfield="%(decode(friendly{text})) writes:"
body:nocomponent,format,nowrap,formatarg="%(trim{content-type})%(putstr)",formatarg="%(trim{content-transfer-encoding})%(putstr)",formatarg=">
 "

/etc/nmh/mhn.defaults changed:
mhshow-show-application: run-mailcap --action=view 'application/%s:%F'
mhshow-show-text: run-mailcap --action=cat 'text/%s:%F'
mhshow-show-text/plain: %lsensible-pager %F
mhshow-show-audio: run-mailcap --action=view 'audio/%s:%F'
mhshow-show-image: run-mailcap --action=view 'image/%s:%F'
mhshow-show-message: run-mailcap --action=view 'message/%s:%F'
mhshow-show-message/rfc822: %lshow -file %F
mhshow-show-video: run-mailcap --action=view 'video/%s:%F'
mhshow-suffix-application/msword: .doc
mhshow-suffix-application/ogg: .ogg
mhshow-suffix-application/onenote: .onepkg
mhshow-suffix-application/onenote: .onetmp
mhshow-suffix-application/onenote: .onetoc
mhshow-suffix-application/onenote: .onetoc2
mhshow-suffix-application/pdf: .pdf
mhshow-suffix-application/postscript: .ps
mhshow-suffix-application/rtf: .rtf
mhshow-suffix-application/vnd.ms-excel.addin.macroEnabled.12: .xlam
mhshow-suffix-application/vnd.ms-excel.sheet.binary.macroEnabled.12: .xlsb
mhshow-suffix-application/vnd.ms-excel.sheet.macroEnabled.12: .xlsm
mhshow-suffix-application/vnd.ms-excel.template.macroEnabled.12: .xltm
mhshow-suffix-application/vnd.ms-excel: .xla
mhshow-suffix-application/vnd.ms-excel: .xlc
mhshow-suffix-application/vnd.ms-excel: .xld
mhshow-suffix-application/vnd.ms-excel: .xll
mhshow-suffix-application/vnd.ms-excel: .xlm
mhshow-suffix-application/vnd.ms-excel: .xls
mhshow-suffix-application/vnd.ms-excel: .xlt
mhshow-suffix-application/vnd.ms-excel: .xlw
mhshow-suffix-application/vnd.ms-powerpoint.addin.macroEnabled.12: .ppam
mhshow-suffix-application/vnd.ms-powerpoint.presentation.macroEnabled.12: .pptm
mhshow-suffix-application/vnd.ms-powerpoint.slide.macroEnabled.12: .sldm
mhshow-suffix-application/vnd.ms-powerpoint.slideshow.macroEnabled.12: .ppsm
mhshow-suffix-application/vnd.ms-powerpoint.template.macroEnabled.12: .potm
mhshow-suffix-application/vnd.ms-powerpoint: .pot
mhshow-suffix-application/vnd.ms-powerpoint: .pps
mhshow-suffix-application/vnd.ms-powerpoint: .ppt
mhshow-suffix-application/vnd.ms-powerpoint: .ppz
mhshow-suffix-application/vnd.ms-word.document.macroEnabled.12: .docm
mhshow-suffix-application/vnd.ms-word.template.macroEnabled.12: .dotm
mhshow-suffix-application/vnd.openxmlformats-officedocument.presentationml.presentation:
 .pptx
mhshow-suffix-application/vnd.openxmlformats-officedocument.presentationml.slide:
 .sldx
mhshow-suffix-application/vnd.openxmlformats-officedocument.presentationml.slideshow:
 .ppsx
mhshow-suffix-application/vnd.openxmlformats-officedocument.presentationml.template:
 .potx
mhshow-suffix-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
 .xlsx
mhshow-suffix-application/vnd.openxmlformats-officedocument.spreadsheetml.template:
 .xltx
mhshow-suffix-application/vnd.openxmlformats-officedocument.wordprocessingml.document:
 .docx
mhshow-suffix-application/vnd.openxmlformats-officedocument.wordprocessingml.template:
 .dotx
mhshow-suffix-application/x-bzip2: .bz2
mhshow-suffix-application/x-cpio: .cpio
mhshow-suffix-application/x-dvi: .dvi
mhshow-suffix-application/x-gzip: .gz
mhshow-suffix-application/x-java-archive: .jar
mhshow-suffix-application/x-javascript: .js
mhshow-suffix-application/x-latex: .latex
mhshow-suffix-application/x-sh: .sh
mhshow-suffix-application/x-tar: .tar
mhshow-suffix-application/x-tex: .tex
mhshow-suffix-application/x-texinfo: .texinfo
mhshow-suffix-application/x-troff-man: .man
mhshow-suffix-application/x-troff-me: .me
mhshow-suffix-application/x-troff-ms: .ms
mhshow-suffix-application/x-troff: .t
mhshow-suffix-application/zip: .zip
mhshow-suffix-audio/basic: .au
mhshow-suffix-audio/midi: .midi
mhshow-suffix-audio/mpeg: .mp3
mhshow-suffix-audio/mpeg: .mpg
mhshow-suffix-audio/x-ms-wma: .wma
mhshow-suffix-audio/x-wav: .wav
mhshow-suffix-image/gif: .gif
mhshow-suffix-image/jpeg: .jpeg
mhshow-suffix-image/jpeg: .jpg
mhshow-suffix-image/png: .png
mhshow-suffix-image/tiff: .tif
mhshow-suffix-image/tiff: .tiff
mhshow-suffix-text/calendar: .ics
mhshow-suffix-text/css: .css
mhshow-suffix-text/html: .html
mhshow-suffix-text/rtf: .rtf
mhshow-suffix-text/sgml: .sgml
mhshow-suffix-text/xml: .xml
mhshow-suffix-video/mpeg: .mpeg
mhshow-suffix-video/mpeg: .mpg
mhshow-suffix-video/quicktime: .moov
mhshow-suffix-video/quicktime: .mov
mhshow-suffix-video/quicktime: .qt
mhshow-suffix-video/quicktime: .qtvr
mhshow-suffix-video/x-ms-wmv: .wmv
mhshow-suffix-video/x-msvideo: .avi
mhstore-store-application/PostScript: %m%P.ps
mhstore-store-text/richtext: %m%P.rt
mhstore-store-text: %m%P.txt
mhstore-store-video/mpeg: %m%P.mpg

-- no debconf information

Reply via email to