I am new to procmail and would like to try my recipe file on an already
existing mbox file containing many email messages before running it on a
POP3 download (with getmail or possibly fetchmail). Is it at all possible,
or do I have to look for another program (like what?) or learn Perl or
Python and write a program in one of those scripting languages? The problem
is that procmail writes the whole file based on the Return-Path line in the
first message; procmail sees the whole mbox file as one message. In an mbox
file, each message must have a beginning line starting with "From ", without
the quotes, and there must be a blank line after each message.
I have several mbox files, including one mb0x094elv, and a recipe1.rc, in
one directory, /usr/local/mailplay (for root) and /home/arlene/mailplay
(for non-root). I have tried commands like
procmail -m recipe1.rc < mbox094elv
formail -ns < mbox094elv | procmail -m recipe1.rc
and the whole file was sent to one file according to the Return-Path line of
the first message. But the line
procmail -m recipe1.rc < single-email-message
where I use an actual email message file name and path instead of
"single-email-message" verbatim, worked when run several successive times on
old email files that were downloaded using UKA-PPP 1.7x2 aka NOS_BOX 2.05
running under DR-DOS 7.03.
Procmail version is 3.15.2, running under Linux (Slackware 10.1), and the
procmail version in the upcoming, just-announced, Slackware 10.2, which I
have just received this week, is also 3.15.2. I went to
http://www.procmail.org/ and downloaded a newer version, 3.22, in source
form, untgz'ed it, but reading the FAQ discourages me, though I could still
try. Running nail -f mbox094elv (instead of procmail), nail recognized the
many individual messages (but has no procmail-like filtering facility),
which procmail didn't. So there ought to be some way, using procmail or
otherwise, to sort those messages according to the Return-Path header line.
I am on many emailing lists, and I have a lot of concatenated email files
from my days using DR-DOS 7.03. I forgot to say what nail is: an enhanced
version of mailx (http://nail.sourceforge.net/).
By the way, I subsequently compiled and used procmail-3.22, but the results
were the same as with 3.15.2, procmail apparently saw the entire mbox file
as one message.
Thanks in advance for any advice you can offer.
Tom
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail