procmail
[Top] [All Lists]

Re: re-delivering mail

2002-02-25 19:18:15
"Jerry O'Brien" <jobrien(_at_)cuttingedge(_dot_)net> writes:
Help! I goofed on a systemwide procmail recipe and got a bunch of mail for
different users into one file. I thought I could re-deliver it with formail:

cat bigfile > formail -s procmail

and have everything split out and delivered. It doesn't deliver anything and
doesn't complian either. Am I on the right track here?

To which "Agustin Rivera" <eleqtriq(_at_)eleqtriq(_dot_)ws> responded:
Try piping it to sendmail

That won't work:

$ sendmail
Recipient names must be specified
^C$

sendmail requires either one or more recipient addresses to be provided
on its command line, or for the -t option to be used, in which case
it'll extract the address from the To:, Cc: and Bcc: header fields.
But the -t option is *WRONG* for this problem: you need to redeliver to
the _envelope_ recipients, not the header recipients.  Indeed, using the
header recipients would result in messages from mailing lists being sent
_back_to_the_list_!  Then all the list owners would have to shoot you.

So, you need to deduce the envelope recipient(s) from the message.
For messages where the _first_ Received: field contains a "for" clause,
it should contain the correct recipient.  For messages without such a
clause you'll need to match the id from that first Received: field with
the recipients recorded in the maillog.

I don't have time to describe how to do that, but I know its been
discussed at least twice on the list, so you should check the archives.
        http://www.xray.mpe.mpg.de/mailing-lists/procmail/


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>