Minimally painful mail client for "rich" (spit!) messages

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Minimally painful mail client for "rich" (spit!) messages

Peter Nicolai Mathias Hansteen
During recent months I've joined some mailing lists with fairly good
signal to noise ratio on a specific topic, the only snag being that a
distressingly large number of otherwise sane messages have been
written using mail clients (fsvo) that by default bury the content in
"rich" formatting that makes it hard for old-style mail readers to
cope.

Telling people off for their choice of mail clients is not an option
(some at least have had that choice made for them), so as a workaround
I probably need to start looking around for a mail client that will
make reading Outlook and peers' output less painful.

Does such a beast exist, preferably among OpenBSD packages (as in, it
has to run on OpenBSD, but I can build locally if needs be)?

I've tried and hated both Evolution and Thunderbird, but surely there
must be other choices?

- Peter
--
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Amit Kulkarni-5
http://openports.se/mail/sylpheed

> Does such a beast exist, preferably among OpenBSD packages (as in, it
> has to run on OpenBSD, but I can build locally if needs be)?

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Oliver Peter-6
In reply to this post by Peter Nicolai Mathias Hansteen
On Wed, Feb 09, 2011 at 05:38:38PM +0100, Peter N. M. Hansteen wrote:

> During recent months I've joined some mailing lists with fairly good
> signal to noise ratio on a specific topic, the only snag being that a
> distressingly large number of otherwise sane messages have been
> written using mail clients (fsvo) that by default bury the content in
> "rich" formatting that makes it hard for old-style mail readers to
> cope.
>
> Telling people off for their choice of mail clients is not an option
> (some at least have had that choice made for them), so as a workaround
> I probably need to start looking around for a mail client that will
> make reading Outlook and peers' output less painful.
>
> Does such a beast exist, preferably among OpenBSD packages (as in, it
> has to run on OpenBSD, but I can build locally if needs be)?
>
> I've tried and hated both Evolution and Thunderbird, but surely there
> must be other choices?

Peter, does mutt (ports/mail/mutt/snapshot I recommend) count as 'old-style'
mail reader, too?  If so, it feels very modern to me and also is my choice
for 'heavy' mail reading.
If you are looking for some graphical client you may want to give clawsmail
a try (mail/claws-mail).

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Ingo Schwarze
In reply to this post by Peter Nicolai Mathias Hansteen
Hi Peter,

Peter N. M. Hansteen wrote on Wed, Feb 09, 2011 at 05:38:38PM +0100:

> During recent months I've joined some mailing lists with fairly good
> signal to noise ratio on a specific topic, the only snag being that a
> distressingly large number of otherwise sane messages have been
> written using mail clients (fsvo) that by default bury the content in
> "rich" formatting that makes it hard for old-style mail readers to
> cope.

Here is what i currently use; in case that doesn't work for you,
you need to be more specific as to what "rich" formatting you are
talking about.

Yours,
  Ingo


schwarze@iris $ cat /etc/mailcap                                              
text/html; /usr/bin/lynx -stdin -force_html -dump ; copiousoutput
text/rtf; /usr/local/bin/unrtf --nopict --text %s ; copiousoutput
application/pdf; /usr/local/bin/pdftotext %s - ; copiousoutput
application/x-pdf; /usr/local/bin/pdftotext %s - ; copiousoutput
application/msword; /usr/local/bin/antiword - ; copiousoutput
application/x-shellscript; /bin/cat ; copiousoutput

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Marco Peereboom
In reply to this post by Peter Nicolai Mathias Hansteen
Stuff crap like this in .mailcap
text/html; /usr/local/bin/links -dump '%s'; copiousoutput; description=HTML Text; na metemplate=%s.html
text/html; /usr/local/bin/links '%s'; needsterminal; description=HTML Text; nametemp late=%s.html

I had them for all kinds of things but can't find that file anymore.

Things like antiword and stuff help.  At one point I had about a
$random_file to ascii converter for about everything.

On Wed, Feb 09, 2011 at 05:38:38PM +0100, Peter N. M. Hansteen wrote:

> During recent months I've joined some mailing lists with fairly good
> signal to noise ratio on a specific topic, the only snag being that a
> distressingly large number of otherwise sane messages have been
> written using mail clients (fsvo) that by default bury the content in
> "rich" formatting that makes it hard for old-style mail readers to
> cope.
>
> Telling people off for their choice of mail clients is not an option
> (some at least have had that choice made for them), so as a workaround
> I probably need to start looking around for a mail client that will
> make reading Outlook and peers' output less painful.
>
> Does such a beast exist, preferably among OpenBSD packages (as in, it
> has to run on OpenBSD, but I can build locally if needs be)?
>
> I've tried and hated both Evolution and Thunderbird, but surely there
> must be other choices?
>
> - Peter
> --
> Peter N. M. Hansteen, member of the first RFC 1149 implementation team
> http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
> "Remember to set the evil bit on all malicious network traffic"
> delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Dennis Davis
In reply to this post by Oliver Peter-6
On Wed, 9 Feb 2011, Oliver Peter wrote:

> From: Oliver Peter <[hidden email]>
> To: [hidden email]
> Date: Wed, 9 Feb 2011 16:53:53
> Subject: Re: Minimally painful mail client for "rich" (spit!) messages
> X-Spam-Score: 0.0 (/)
>
> On Wed, Feb 09, 2011 at 05:38:38PM +0100, Peter N. M. Hansteen wrote:

...

> > I probably need to start looking around for a mail client that
> > will make reading Outlook and peers' output less painful.
> >
> > Does such a beast exist, preferably among OpenBSD packages (as
> > in, it has to run on OpenBSD, but I can build locally if needs
> > be)?
> >
> > I've tried and hated both Evolution and Thunderbird, but surely
> > there must be other choices?
>
> Peter, does mutt (ports/mail/mutt/snapshot I recommend) count as
> 'old-style' mail reader, too?  If so, it feels very modern to
> me and also is my choice for 'heavy' mail reading.  If you are
> looking for some graphical client you may want to give clawsmail a
> try (mail/claws-mail).

Similarly for an 'old-style' mail reader I use alpine
(ports/mail/alpine) or build re-alpine:

http://sourceforge.net/projects/re-alpine/

from scratch.

I also quite like claws-mail as a graphical mail reader.  Also
sylpheed (ports/mail/sylpheed) from which claws-mail is a
development.

If you want to go wierder, the linux graphical mail reader mulberry:

http://www.mulberrymail.com/

works well under linux emulation.  Although you'll need to augment
the linux emulation with the linux rpm openssl-0.9.8b-8.i386.rpm to
get the secure connection stuff.
--
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK
[hidden email]               Phone: +44 1225 386101

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Igor Zinovik-3
In reply to this post by Marco Peereboom
On Feb 09, Marco Peereboom wrote:
> Stuff crap like this in .mailcap
> text/html; /usr/local/bin/links -dump '%s'; copiousoutput; description=HTML Text; na metemplate=%s.html
> text/html; /usr/local/bin/links '%s'; needsterminal; description=HTML Text; nametemp late=%s.html
>
> I had them for all kinds of things but can't find that file anymore.

Here is mine for example.  Hope it will be useful for somebody on misc@

# $Id: mailcap,v 1.15 2011/02/08 18:42:07 zinovik Exp $
application/msword ; catdoc -s koi8-r.txt %s ; copiousoutput
application/vnd.msword ; catdoc -s koi8-r.txt %s ; copiousoutput
application/excel ; xls2csv %s | sed 's/,/        /g'; copiousoutput
application/msexcel ; xls2csv %s | sed 's/,/        /g'; copiousoutput
application/ms-Excel ; xls2csv %s | sed 's/,/        /g'; copiousoutput
application/vnd.ms-excel ; xls2csv %s | sed 's/,/        /g'; copiousoutput
application/x-excel ; xls2csv %s | sed 's/,/        /g'; copiousoutput

application/octet-stream ; cat %s ; copiousoutput
application/x-bzip2 ; bzip2 -dc %s ; copiousoutput
application/x-cpio ; cpio -tvF --quiet %s ; copiousoutput
application/x-csh ; cat %s ; copiousoutput
application/x-diff-gzip ; zcat %s ; copiousoutput
application/x-gtar ; tar tvf %s ; copiousoutput
application/x-gzip ; tar tfz %s ; copiousoutput
application/gzip ; tar tfz %s ; copiousoutput
application/x-gunzip ; gzcat ; copiousoutput
application/x-latex ; cat %s ; copiousoutput
application/x-perl ; cat %s ; copiousoutput
application/x-script ; cat %s ; copiousoutput
application/x-shar ; cat %s                 ; copiousoutput
application/x-shellscript ; cat %s                 ; copiousoutput
application/x-sh ; cat %s                 ; copiousoutput
application/x-tar ; tar tzf %s ; copiousoutput
application/x-tar-gz ; gunzip -c %s | tar -tf - ; copiousoutput
application/x-tcl ; cat %s                        ; copiousoutput
application/x-tex ; cat %s                        ; copiousoutput
application/x-troff ; groff -Tlatin1 %s ; copiousoutput
application/x-troff-man ; man -l %s 2>/dev/null         ; copiousoutput
application/x-troff-me ; groff -me -Tlatin1 %s         ; copiousoutput
application/x-zip-compressed ; unzip -v %s                   ; copiousoutput
application/zip                 ; unzip -v %s                   ; copiousoutput

text/comma-separated-values     ; cat %s                        ; copiousoutput
text/x-compress-html            ; zcat %s | lynx -dump ; copiousoutput
text/x-gzip-html             ; zcat %s | lynx -dump ; copiousoutput
text/html ; lynx -force_html -assume_charset=koi8-r -assume_unrec_charset=utf8 -dump %s \
                                                                ; copiousoutput; nametemplate=%s.html
image/* ; anytopnm %s | pnmscale -xsize 80 -ysize 50|ppmtopgm|pgmtopbm|pbmtoascii \
                                                                ; copiousoutput

> Things like antiword and stuff help.  At one point I had about a
> $random_file to ascii converter for about everything.
>
> On Wed, Feb 09, 2011 at 05:38:38PM +0100, Peter N. M. Hansteen wrote:
> > During recent months I've joined some mailing lists with fairly good
> > signal to noise ratio on a specific topic, the only snag being that a
> > distressingly large number of otherwise sane messages have been
> > written using mail clients (fsvo) that by default bury the content in
> > "rich" formatting that makes it hard for old-style mail readers to
> > cope.
> >
> > Telling people off for their choice of mail clients is not an option
> > (some at least have had that choice made for them), so as a workaround
> > I probably need to start looking around for a mail client that will
> > make reading Outlook and peers' output less painful.
> >
> > Does such a beast exist, preferably among OpenBSD packages (as in, it
> > has to run on OpenBSD, but I can build locally if needs be)?
> >
> > I've tried and hated both Evolution and Thunderbird, but surely there
> > must be other choices?
> >
> > - Peter
> > --
> > Peter N. M. Hansteen, member of the first RFC 1149 implementation team
> > http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
> > "Remember to set the evil bit on all malicious network traffic"
> > delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Andres Perera-4
In reply to this post by Ingo Schwarze
On Wed, Feb 9, 2011 at 12:26 PM, Ingo Schwarze <[hidden email]> wrote:
> application/x-shellscript; /bin/cat ; copiousoutput

hmm, this would be nice for syntax hl independent of mua

assuming mua can parse ascii color escapes like less -R

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Jan Stary
In reply to this post by Ingo Schwarze
On Feb 09 17:56:59, Ingo Schwarze wrote:
> text/html; /usr/bin/lynx -stdin -force_html -dump ; copiousoutput

On Feb 09 10:59:54, Marco Peereboom wrote:
> text/html; /usr/local/bin/links -dump '%s'; copiousoutput; description=HTML Text; na metemplate=%s.html

On Feb 09 23:12:27, Igor Zinovik wrote:
> text/html ; lynx -force_html -assume_charset=koi8-r -assume_unrec_charset=utf8 -dump %s ; copiousoutput; nametemplate=%s.html


I have been using (variations of) these for years in my ~/.mailcap,
which made mutt(1) launch lynx(1) on the html attachments. Since
I upgraded to

OpenBSD 4.8-current (GENERIC) #448: Fri Oct 22 09:43:05 MDT 2010
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC

with mutt-1.5.21p0, it no longer works.
(Should I take this to ports?)

Trying to view a HTML attachment from the attachment menu
results in the attachment being displayed by mutt's internal
viewer. I stripped my ~/.mailcap to the minimum suggested by
http://www.mutt.org/doc/manual/manual-5.html#ss5.3

        text/html; lynx %s ; nametemplate=%s.html

and even that does not work. It seems like my ~/.mailcap is ignored.
(Copying to /etc/mailcap doesn't seem to make any difference.)

Does anyone have a hint of what could be causing this?

        Thank you for your time.

                Jan

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Joachim Schipper-2
On Thu, Feb 24, 2011 at 10:11:22AM +0100, Jan Stary wrote:
> On Feb 09 17:56:59, Ingo Schwarze wrote:
> > text/html; /usr/bin/lynx -stdin -force_html -dump ; copiousoutput
>
> On Feb 09 10:59:54, Marco Peereboom wrote:
> > text/html; /usr/local/bin/links -dump '%s'; copiousoutput; description=HTML Text; na metemplate=%s.html
>
> On Feb 09 23:12:27, Igor Zinovik wrote:
> > text/html ; lynx -force_html -assume_charset=koi8-r -assume_unrec_charset=utf8 -dump %s ; copiousoutput; nametemplate=%s.html

> I have been using (variations of) these for years in my ~/.mailcap,
> which made mutt(1) launch lynx(1) on the html attachments. Since
> I upgraded to
>
> OpenBSD 4.8-current (GENERIC) #448: Fri Oct 22 09:43:05 MDT 2010
>     [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
>
> with mutt-1.5.21p0, it no longer works.
> (Should I take this to ports?)
>
> Trying to view a HTML attachment from the attachment menu
> results in the attachment being displayed by mutt's internal
> viewer. I stripped my ~/.mailcap to the minimum suggested by
> http://www.mutt.org/doc/manual/manual-5.html#ss5.3
>
> text/html; lynx %s ; nametemplate=%s.html
>
> and even that does not work. It seems like my ~/.mailcap is ignored.
> (Copying to /etc/mailcap doesn't seem to make any difference.)
>
> Does anyone have a hint of what could be causing this?

text/html is usually in Mutt's auto_view list; auto_view stuff is
automatically piped through any viewer with "copiousoutput" set, whereas
non-"copiousoutput" entries are only used if you explicitly open it ('v'
-> select item -> 'm').

E.g. from my mailcap:

# Process HTML with firefox or w3m
text/html; firefox -a firefox -remote 'openurl(%s)' ; test=[ ! -z "$DISPLAY" ] && pgrep -xu `id -u` firefox-bin
text/html; firefox %s ; test=[ ! -z "$DISPLAY" ]
text/html; w3m %s ; nametemplate=%s.html
text/html; w3m -dump %s ; copiousoutput ; nametemplate=%s.html

When viewing HTML mail, it uses w3m -dump (auto_view, copiousoutput).

When opening ('m') HTML stuff, it uses:
* a running Firefox, if mutt is running under X and a running Firefox
  is available;
* otherwise, a new Firefox, if mutt is running under X;
* otherwise, w3m.

                Joachim

--
TFMotD: mkdep (1) - construct Makefile dependency list
http://www.joachimschipper.nl/

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Paul de Weerd
On Thu, Feb 24, 2011 at 10:57:26AM +0100, Joachim Schipper wrote:
| > and even that does not work. It seems like my ~/.mailcap is ignored.
| > (Copying to /etc/mailcap doesn't seem to make any difference.)
| >
| > Does anyone have a hint of what could be causing this?
|
| text/html is usually in Mutt's auto_view list; auto_view stuff is
| automatically piped through any viewer with "copiousoutput" set, whereas
| non-"copiousoutput" entries are only used if you explicitly open it ('v'
| -> select item -> 'm').

See option implicit_autoview in muttrc(5).  I personally prefer to
have "set implicit_autoview=no".

Paul 'WEiRD' de Weerd

--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/                 

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Denny White
In reply to this post by Jan Stary
 On Thu, Feb 24, 2011 at 10:11:22AM +0100, Jan Stary spoke thusly:

> On Feb 09 17:56:59, Ingo Schwarze wrote:
> > text/html; /usr/bin/lynx -stdin -force_html -dump ; copiousoutput
>
> On Feb 09 10:59:54, Marco Peereboom wrote:
> > text/html; /usr/local/bin/links -dump '%s'; copiousoutput; description=HTML Text; na metemplate=%s.html
>
> On Feb 09 23:12:27, Igor Zinovik wrote:
> > text/html ; lynx -force_html -assume_charset=koi8-r -assume_unrec_charset=utf8 -dump %s ; copiousoutput; nametemplate=%s.html
>
>
> I have been using (variations of) these for years in my ~/.mailcap,
> which made mutt(1) launch lynx(1) on the html attachments. Since
> I upgraded to
>
> OpenBSD 4.8-current (GENERIC) #448: Fri Oct 22 09:43:05 MDT 2010
>     [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
>
> with mutt-1.5.21p0, it no longer works.
> (Should I take this to ports?)
>
> Trying to view a HTML attachment from the attachment menu
> results in the attachment being displayed by mutt's internal
> viewer. I stripped my ~/.mailcap to the minimum suggested by
> http://www.mutt.org/doc/manual/manual-5.html#ss5.3
>
> text/html; lynx %s ; nametemplate=%s.html
>
> and even that does not work. It seems like my ~/.mailcap is ignored.
> (Copying to /etc/mailcap doesn't seem to make any difference.)
>
> Does anyone have a hint of what could be causing this?
>
> Thank you for your time.
>
> Jan

Possibly completely offbase here. Can't see your .muttrc so don't know
if you have the following in it or not:

set mailcap_path="~/.mailcap"

or whatever the path is to the .mailcap you want to use. Possibly the
.mailcap entry is commented out in your .muttrc file. Pretty sure it
is commented out by default in the sample.mailcap file.


Denny White


--

===============================================================
Denny White - [hidden email]
GnuPG key  : 0x1644E79A  |  http://wwwkeys.de.pgp.net
Fingerprint: D0A9 AD44 1F10 E09E 0E67  EC25 CB44 F2E5 1644 E79A
===============================================================
() ASCII ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
===============================================================

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Jan Stary
In reply to this post by Joachim Schipper-2
On Feb 24 10:57:26, Joachim Schipper wrote:

> On Thu, Feb 24, 2011 at 10:11:22AM +0100, Jan Stary wrote:
> > On Feb 09 17:56:59, Ingo Schwarze wrote:
> > > text/html; /usr/bin/lynx -stdin -force_html -dump ; copiousoutput
> >
> > On Feb 09 10:59:54, Marco Peereboom wrote:
> > > text/html; /usr/local/bin/links -dump '%s'; copiousoutput; description=HTML Text; na metemplate=%s.html
> >
> > On Feb 09 23:12:27, Igor Zinovik wrote:
> > > text/html ; lynx -force_html -assume_charset=koi8-r -assume_unrec_charset=utf8 -dump %s ; copiousoutput; nametemplate=%s.html
>
> > I have been using (variations of) these for years in my ~/.mailcap,
> > which made mutt(1) launch lynx(1) on the html attachments. Since
> > I upgraded to
> >
> > OpenBSD 4.8-current (GENERIC) #448: Fri Oct 22 09:43:05 MDT 2010
> >     [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
> >
> > with mutt-1.5.21p0, it no longer works.
> > (Should I take this to ports?)
> >
> > Trying to view a HTML attachment from the attachment menu
> > results in the attachment being displayed by mutt's internal
> > viewer. I stripped my ~/.mailcap to the minimum suggested by
> > http://www.mutt.org/doc/manual/manual-5.html#ss5.3
> >
> > text/html; lynx %s ; nametemplate=%s.html
> >
> > and even that does not work. It seems like my ~/.mailcap is ignored.
> > (Copying to /etc/mailcap doesn't seem to make any difference.)
> >
> > Does anyone have a hint of what could be causing this?
>
> text/html is usually in Mutt's auto_view list; auto_view stuff is
> automatically piped through any viewer with "copiousoutput" set,

Yes, but that's not the issue here. I don't want the html attachments to
be autoviewed; in fact, I have 'set implicit_autoview=no' in ~/.muttrc

> whereas non-"copiousoutput" entries are only used if you explicitly open it
> ('v' -> select item -> 'm').

This is what I want; and in fact, it does work, when I explicitly open
them with 'v' -> select  -> 'm'; until now,, I have been explicitly
opening the attachments I wanted to view with 'v' -> select -> Enter.
That's what stooped working; opening them with 'm' runs the correct
(~/.mailcap) lynx command over them.

Thank you!

        Jan

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Ingo Schwarze
Sorry for not snipping more, all the old text is really needed to
understand the answer.

Jan Stary wrote on Fri, Feb 25, 2011 at 02:36:52PM +0100:
> On Feb 24 10:57:26, Joachim Schipper wrote:
>> On Thu, Feb 24, 2011 at 10:11:22AM +0100, Jan Stary wrote:
>>> On Feb 09 17:56:59, Ingo Schwarze wrote:

>>>> text/html; /usr/bin/lynx -stdin -force_html -dump ; copiousoutput
[...]

>>> I have been using (variations of) these for years in my ~/.mailcap,
>>> which made mutt(1) launch lynx(1) on the html attachments. Since
>>> I upgraded to
>>>
>>> OpenBSD 4.8-current (GENERIC) #448: Fri Oct 22 09:43:05 MDT 2010
>>>     [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
>>>
>>> with mutt-1.5.21p0, it no longer works.
>>> (Should I take this to ports?)
>>>
>>> Trying to view a HTML attachment from the attachment menu
>>> results in the attachment being displayed by mutt's internal
>>> viewer. I stripped my ~/.mailcap to the minimum suggested by
>>> http://www.mutt.org/doc/manual/manual-5.html#ss5.3
>>>
>>> text/html; lynx %s ; nametemplate=%s.html
>>>
>>> and even that does not work. It seems like my ~/.mailcap is ignored.
>>> (Copying to /etc/mailcap doesn't seem to make any difference.)
>>>
>>> Does anyone have a hint of what could be causing this?

>> text/html is usually in Mutt's auto_view list; auto_view stuff is
>> automatically piped through any viewer with "copiousoutput" set,

> Yes, but that's not the issue here. I don't want the html attachments to
> be autoviewed; in fact, I have 'set implicit_autoview=no' in ~/.muttrc
 
>> whereas non-"copiousoutput" entries are only used if you explicitly open it
>> ('v' -> select item -> 'm').

> This is what I want; and in fact, it does work, when I explicitly open
> them with 'v' -> select  -> 'm'; until now,, I have been explicitly
> opening the attachments I wanted to view with 'v' -> select -> Enter.
> That's what stooped working; opening them with 'm' runs the correct
> (~/.mailcap) lynx command over them.

Reading manual.txt, i understand this is intended behaviour.
If i understand correctly, with "set implicit_autoview=no",
the "auto_view" list is used for two purposes:
 - When viewing the message as a whole, to decide whether a given
   MIME part should be displayed inline after running it through
   the MIME handler,
 - and from the "v"iew menu, when selecting a part with "Enter"
   (as opposed to selecting it with "m"), to decide whether to
   use the MIME handler or to display it as raw text using the
   internal pager.
So yes, when you have neither "set implicit_autoview=yes" nor
"auto_view text/html", you have to type "v" "m" to start lynx.

In case this was different in old versions of mutt, it may either
have been a bug or an intentional change of behaviour.

Citations from manual.txt:

  3.110. implicit_autoview
  [...]
   If set to "yes", mutt will look for a mailcap entry with the
   "copiousoutput" flag set for every MIME attachment it doesn't have an
   internal viewer defined for. If such an entry is found, mutt will use
   the viewer defined in that entry to convert the body part to text form.

So conversely, without implicit_autoview, it will only look for mailcap
entries for MIME types listed in auto_view, or when explicitely
requested with "v" "m".

  4. MIME Autoview
  [...]
   In addition to explicitly telling Mutt to view an attachment with the
   MIME viewer defined in the mailcap file from the attachments menu, Mutt
   has support for automatically viewing MIME attachments while in the
   pager.

That's what you ask for when pressing "v" "Enter", so without auto_view,
you will get raw HTML tags displayed in the internal parser, bacause
the MIME handler will not be called.

Yours,
  Ingo

Reply | Threaded
Open this post in threaded view
|

Re: Minimally painful mail client for "rich" (spit!) messages

Jan Stary
On Feb 27 14:02:11, Ingo Schwarze wrote:

> Sorry for not snipping more, all the old text is really needed to
> understand the answer.
>
> Jan Stary wrote on Fri, Feb 25, 2011 at 02:36:52PM +0100:
> > On Feb 24 10:57:26, Joachim Schipper wrote:
> >> On Thu, Feb 24, 2011 at 10:11:22AM +0100, Jan Stary wrote:
> >>> On Feb 09 17:56:59, Ingo Schwarze wrote:
>
> >>>> text/html; /usr/bin/lynx -stdin -force_html -dump ; copiousoutput
> [...]
>
> >>> I have been using (variations of) these for years in my ~/.mailcap,
> >>> which made mutt(1) launch lynx(1) on the html attachments. Since
> >>> I upgraded to
> >>>
> >>> OpenBSD 4.8-current (GENERIC) #448: Fri Oct 22 09:43:05 MDT 2010
> >>>     [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
> >>>
> >>> with mutt-1.5.21p0, it no longer works.
> >>> (Should I take this to ports?)
> >>>
> >>> Trying to view a HTML attachment from the attachment menu
> >>> results in the attachment being displayed by mutt's internal
> >>> viewer. I stripped my ~/.mailcap to the minimum suggested by
> >>> http://www.mutt.org/doc/manual/manual-5.html#ss5.3
> >>>
> >>> text/html; lynx %s ; nametemplate=%s.html
> >>>
> >>> and even that does not work. It seems like my ~/.mailcap is ignored.
> >>> (Copying to /etc/mailcap doesn't seem to make any difference.)
> >>>
> >>> Does anyone have a hint of what could be causing this?
>
> >> text/html is usually in Mutt's auto_view list; auto_view stuff is
> >> automatically piped through any viewer with "copiousoutput" set,
>
> > Yes, but that's not the issue here. I don't want the html attachments to
> > be autoviewed; in fact, I have 'set implicit_autoview=no' in ~/.muttrc
>  
> >> whereas non-"copiousoutput" entries are only used if you explicitly open it
> >> ('v' -> select item -> 'm').
>
> > This is what I want; and in fact, it does work, when I explicitly open
> > them with 'v' -> select  -> 'm'; until now,, I have been explicitly
> > opening the attachments I wanted to view with 'v' -> select -> Enter.
> > That's what stooped working; opening them with 'm' runs the correct
> > (~/.mailcap) lynx command over them.
>
> Reading manual.txt, i understand this is intended behaviour.
> If i understand correctly, with "set implicit_autoview=no",
> the "auto_view" list is used for two purposes:
>  - When viewing the message as a whole, to decide whether a given
>    MIME part should be displayed inline after running it through
>    the MIME handler,
>  - and from the "v"iew menu, when selecting a part with "Enter"
>    (as opposed to selecting it with "m"), to decide whether to
>    use the MIME handler or to display it as raw text using the
>    internal pager.
> So yes, when you have neither "set implicit_autoview=yes" nor
> "auto_view text/html", you have to type "v" "m" to start lynx.
>
> In case this was different in old versions of mutt, it may either
> have been a bug or an intentional change of behaviour.

I haven't changed my mutt configuration, so it was probably
an intentional change of behaviour.

Anyway, now that I have read about the MIME chapter again,
I am in fact using auto_view for text/html with (.muttrc)

set implicit_autoview=no
auto_view text/html
alternative_order text/plain text/enriched

and (.mailcap)

text/html ; lynx -assume_charset=iso-8859-2 %s ; nametemplate=%s.html
text/html ; lynx -assume_charset=iso-8859-2 -dump -nolist -force_html %s ; \
        nametemplate=%s.html ; copiousoutput


>   3.110. implicit_autoview
>   [...]
>    If set to "yes", mutt will look for a mailcap entry with the
>    "copiousoutput" flag set for every MIME attachment it doesn't have an
>    internal viewer defined for. If such an entry is found, mutt will use
>    the viewer defined in that entry to convert the body part to text form.
>
> So conversely, without implicit_autoview, it will only look for mailcap
> entries for MIME types listed in auto_view, or when explicitely
> requested with "v" "m".

Yes; this is what I am using now.

>   4. MIME Autoview
>   [...]
>    In addition to explicitly telling Mutt to view an attachment with the
>    MIME viewer defined in the mailcap file from the attachments menu, Mutt
>    has support for automatically viewing MIME attachments while in the
>    pager.
>
> That's what you ask for when pressing "v" "Enter", so without auto_view,
> you will get raw HTML tags displayed in the internal parser, bacause
> the MIME handler will not be called.

Yes; your explanation is correct.

        Thank you for your time

                Jan