"David R. Linn" <drl(_at_)vuse(_dot_)vanderbilt(_dot_)edu> writes:
...
formail to slice an existing mailbox into pieces and then pass each
message in the mailbox to *procmail* to do the duplicate suppression
(using formail to maintain a cache of Message-IDs) and filtering on
date. You'll use a command something like
formail -Y -s procmail -m pmrc
where pmrc is a procmail recipe file like .procmailrc that does the
various things you want.
I had always seen procmail using formail, not the other way around.
Uhhh... the 2nd example in the formail man page ????
Also, note that that example indicates that my suggestion should
have included the -d flag in the toplevel formail invocation. You
may also may not need the -Y flag that I use so my suggestion is
now
formail -ds procmail -m pmrc
If it's a real mailbox then you should *not* use the -d option: that's
for splitting digests. When splitting mailboxes your original suggestion
was correct:
formail -Y -s procmail -m pmrc
The difference is that -d tells formail to start a new message whenever
it sees a bunch of lines that look like header fields. Normally it
requires a "From " line before the header field-like lines. If the
mailbox contains a digest message, the -d option would split the digest
instead of treating it as a single message.
...
If you prefer to have the outer formail suppress duplicates, this
changes to
formail [-Y] -D 200000 cache -d -s procmail -m pmrc [< mbox]
That would be
formail -Y -D 200000 cache -s procmail -m rmrc [< mbox]
I have a memory that formail will still invoke procmail even when it
hits a duplicate, but it'll feed procmail a zero-length message. That's
generally not a problem unless your rcfile feeds the message back
through formail again, but for paranoia he could put
:0
* < 1
/dev/null
at the top of the rcfile.
Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail