[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Command-line/batch tools for handling mail attachments?



For both of you, how about formail as a tool? Or, alternatively, Perl's mail handling modules like Mail::Mbox::MessageParser or Mail::MboxParser ?

Cheers,
Andy (who used MANGOnet while in Zimbabwe in 1992)

----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin (at) unc.edu - http://www.unc.edu/~aperrin
Assistant Professor of Sociology; Book Review Editor, _Social Forces_
University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA
New Book: http://www.press.uchicago.edu/cgi-bin/hfs.cgi/00/178592.ctl



On Thu, 12 Jan 2006, Jim Holland wrote:

Hi

On 11 Jan 2006, Don McLaughlin wrote:

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.

I am currently working on exactly this problem (for a FidoNet/Internet
mail gateway), but have no simple solutions.  The best utility that I have
come across so far is uudeview, which works well for extracting
attachments, but sadly it is not very good at keeping the headers and text
from the body of messages.

Regards

Jim Holland
System Administrator
MANGO - Zimbabwe's non-profit e-mail service



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





Reply to: