On 2010-06-14, Steve Brown wrote:
> Hi List.
> 
> I'm struggling to get my head around a small problem that I have, and I 
> wonder if one of you would be kind enough to give me a pointer or two.
> 
> I receive a number of emails with word attachments.
> 
> I can happily read them inline using antiword and things are fine.
> 
> It has come to pass that I need to save some of these emails as a text 
> file, pretty much as it is in Mutt's pager. That is, the email body, 
> then the text of the attachments, concatenated into one file. I just 
> need plain text, nothing fancy at all.
> 
> My guess is that I need to write a macro to do it, and it is here that 
> things fall down.
> 
> I am a very basic user of Mutt - I use it to read email very quickly and 
> to send quick replies. I don't have a huge email load at the moment but 
> this will change and the number of emails I have to process is likely to 
> increase significantly. All things point to using Mutt over a graphical 
> client, they are just too damned slow.
> 
> I've toyed with the idea of using procmail to store all of these emails 
> as text files automatically, but I don't need to keep them all, so Mutt 
> is the obvious candidate for reviewing and discarding/keeping the 
> required emails.

If I understand you correctly, this is really easy to do, and the
functions to do it are built in.  To save a copy of the message, use
the decode-copy function bound by default to <Esc>C, or to save the
message and mark the original for deletion, use the decode-save
function bound by default to <Esc>s.  You can find both of these in
the help menus for the index and the pager.  The decode- versions of
these functions will use filters defined in your mailcap file to
decode the attachments from Word to plain text, just as in the
pager, as they are written to the specified files along with the
message bodies.

Regards,
Gary

Reply via email to