Command-line/batch tools for handling mail attachments?



I'd appreciate any pointers to some command-line tools for doing the
following.

(1) Take mail and news messages as input files and produce as output
files the same messages but with all the attachments, HTML parts,
and other non-plain-text stuff deleted, keeping the headers and
the plain-text of the body, as if the sender had written the
message without attachments or HTML.

What I really want to do is use maildirs and news spools as input
and produce a directory of cleaned files, which will then be used
for corpus linguistics. But if I can find a straight filter
program (stdin, stdout) and I can write a script to find -exec it.

I looked at mimefilter but I don't want to generate outgoing
messages to the senders and all that.


(2) Take a mail message file as input and output a directory
containing separate files of the decoded attachments and the text
of the message (preferably with the mail headers).

This would be for archiving my own e-mail.

Thanks,
Don


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Command-line/batch tools for handling mail attachments?
    ... > Take mail and news messages as input files and produce as output ... > message without attachments or HTML. ... > with a subject of "unsubscribe". ... Debian GNU/Linux Consultant ...
    (Debian-User)
  • Re: Command-line/batch tools for handling mail attachments?
    ... as if the sender had written the ... message without attachments or HTML. ... of the message (preferably with the mail headers). ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Command-line/batch tools for handling mail attachments?
    ... > Take mail and news messages as input files and produce as output ... > message without attachments or HTML. ... Mailtextbody reads a complete email message on stdin and returns ...
    (Debian-User)
  • Re: Usenet rules on domain
    ... @domainname.com and select News or Mail and News messages and press OK, ... Bert Kinney MS-MVP Shell/User ... >> You can block messages from a particular sender or domain. ... Newsgroup messages from blocked senders are not ...
    (microsoft.public.windowsxp.help_and_support)