l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2002 Oct 21 22:53

The following is an archive of a post made to our 'vox mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
mutt capabilities: html, crash recovery, hooks, news (was Re: [vox] One
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mutt capabilities: html, crash recovery, hooks, news (was Re: [vox] One more test...I promise!)

on Mon, Oct 21, 2002, Mark K. Kim (markslist@cbreak.org) wrote:
> Since you guys brought it up...
> I'm currently using Mutt to read messages, but use Pine to write messages.
> I find Mutt's threading, color-hiliting, and message marking (+, T, O,...)
> very useful, but I find it lacking in a few areas:
>    1 It can't read HTML messages.

Modify /etc/mailcap.  I'm including (a portion of) the user section of
mine (Debian organizes its mailcap this way).  Not only can mutt read
HTML, but it can handle MS Word, MS Excel, postscript, and pdf, all on
a console session (this may be limited by graphical components of the
document, but it's a good 90% solution). 

> 2. Can't handle sudden disconnections.
> If you're in the middle of composing a message and you get disconnected,
> it's a pimple-on-the-butt to find your lost message in /tmp and do the
> whole recovery manually.  As much as I like to compose mail by Vim, I'd
> like some way to automatically recover from sudden disconnections.  PINE
> does this so well.
> No matter what "work-around" you may come up with (ie, `screen`, use
> ~/tmp, etc.), it doesn't change the fact that Mutt's inability to recover
> automatically from sudden disconnections is a shortcoming of Mutt.

That's screen's job, as several others have noted.  On a multi-user
system, you should be specifying $TMPDIR anyway, unless you _like_
having other people monitor your activities.

That said, if you think crash recovery is a useful feature, you might
care to wishlist it.

>    3 It can't read news messages.

It can, via a patch (which you discuss and dismiss above WRT HTML).
Though I don't muchly care for this.  My usual Usenet interface these
days is Google Groups, followed by Pan.  If pine works for you as a
newsreader, then use a real mail program, and fall back to pine for
news.  Through screen ;-)

>    4 I still haven't figured out how to setup multiple "From"s,
>      short of changing the header manually every time I want
>      different "From" line, but that's probably just me.

There's more than one way to do it.

   1. Edit all headers.
   2. Edit just the 'From' header.
   3. Use hooks.

Item number three is really powerful feature of mutt.  Using various
hooks -- folder, send, save, fcc, message, etc. -- you can set
characteristics or behaviors based on specific context:  what folder
you're mailing from, what recipients you're specifying.

Most useful in your case might be to specify a folder-hook or a
send-hook, which checks for whether you're sending mail from a specific
folder (you're using procmail to organize mail by subject), or to a
specific address (you adopt a persona for your work mail) and sets
things appropriately.

My own major gripe against mutt is that it doesn't index header
information for a mailbox.  Performance is reasonable up to several
hundered, maybe 1000 messages.  Above that, opening a mailbox can take a
significant amount of time.  If the mailbox is being updated, this can
result in a deadlock where, once mutt's done scanning headers, the
mailbox has changed and needs to be rescanned, which takes days, and
once mutt's done scanning....   There's a patch available for this as
well, I haven't applied it.


Following is from /etc/mailcap.

'excel2text' is a short shell script available here:


/etc/mailcap (partial)
# ----- User Section Begins ----- #

application/msword;   wvMime '%s'; needsterminal; description=Microsoft Word Doc
ument; test=test -n "$DISPLAY"; print=wvWare -x /usr/share/wv/wvHtml.xml '%s' | 
lynx -dump -force_html -nolist /dev/stdin | print text/plain:-
application/pdf;   /usr/bin/xpdf '%s'; test=test "$DISPLAY" != ""; description=P
ortable Document Format; nametemplate=%s.pdf
application/pdf;   /usr/bin/X11/gv '%s'; test=test -n "$DISPLAY"
text/html;   /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML Tex
t; nametemplate=%s.html

# application/excel;   excel2text %s; copiousoutput
# application/vnd.ms-excel;   excel2text %s; needsterminal; copiousoutput

application/excel;              excel2text %s; copiousoutput
application/msexcel;            excel2text %s; copiousoutput
application/vnd.ms-excel;       excel2text %s; copiousoutput
application/x-excel;            excel2text %s; copiousoutput
application/x-msexcel;          excel2text %s; copiousoutput
application/ms-Excel;           excel2text %s; copiousoutput

application/postscript; /usr/bin/X11/gv '%s'; test=test -n "$DISPLAY"; description=postscript
application/pdf; /usr/bin/X11/gv '%s'; test=test -n "$DISPLAY"
text/html; /usr/bin/html2text '%s'; copiousoutput; description=HTML Text
text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html

application/rtf; Ted '%s'; description=Rich Text Format file; test=test -n "$DISPLAY"; compose=Ted '%s'; edit=Ted '%s'; nametemplate=%s.rtf
application/msword; catdoc '%s'; copiousoutput; description="MS Word Text";

# -----  User Section Ends  ----- #

Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
   Burn all gifs!  Use PNG and tell Unisys to go to hell:

Attachment: pgp00011.pgp
Description: PGP signature

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.