procmail
[Top] [All Lists]

Re: splitting emacs RMAIL (Babyl) file w/ formail

2001-07-16 01:05:20
Wayne Stewart <wstewart(_at_)altaserv(_dot_)net> writes:
My reading of the formail man page leads me to believe that I can
produce a standard mailbox file from an emacs RMAIL (Babyl) file using
a command line like:

   formail -Bds < RMAIL > mbox.emacs


The emacs 'rmail' package also has a function called 'unrmail' which
converts an RMAIL file into mailbox format.  When I compare what I
obtain from 'unrmail' with the output of the above 'formail' command,
the two outputs are very different.  The output of emacs 'unrmail'
definitely appears to be more correct.  For example, the formail
output begins with:

   From foo(_at_)bar  Tue Jul 10 17:51:09 2001
   Summary-line:  ...

but the email address "foo(_at_)bar" does not occur in the RMAIL input
file.

The foo(_at_)bar is a standard sign from formail.  To quote the second
paragraph of the formail(1) manpage:

       If formail is supposed to  determine  the  sender  of  the
       mail,  but  is  unable  to  find  any,  it will substitute
       `foo(_at_)bar'.


If you're wondering why I don't just use 'unrmail', I want to use
formail to do more sophisticated processing of my RMAIL mailbox
('unrmail' *only* converts the entire RMAIL file to inbox format).
However, first I would like to be assured that formail is robust and
reliable when processing emacs RMAIL/Babyl files.

I would call formail consistent, but not robust, in its conversion of
BABYL format files.  I suspect it was originally added purely to help
people converting from RMAIL to other packages, but I can't be sure.
RMAIL's own unrmail function will be more robust and complete, but that's
the because it was written by the RMAIL people themselves.

While it wouldn't be as efficient, would it sufficient your purposes to
invoke unrmail as a batch command, using "emacs -batch -f...." and then
postprocess the resulting file using formail and other tools?  If not,
then hacking unrmail (how good are you with elisp?) may be your best bet.


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>