procmail
[Top] [All Lists]

Re: perl script to remail contents of mbox file

2004-06-10 12:50:37
Jeff wrote,

> I screwed up my procmail rules yesterday and procmail delivered ALL
> of my inbound email to my trash mbox file, instead of delivering to
> the intended recipients.

Wait a sec.  On one hand you say "my inbound mail" and on the other you
speak of "intended recipients" in the plural.

Are we talking about mail coming to you personally, or mail for whose
local delivery you're responsible in some sort of administrative capacity?

If it's the former, you're reinventing the wheel:

 mv trashbox recyclebox
 formail -s procmail < recyclebox

The name change is to prevent a loop on messages that procmail is
supposed to put into the trashbox.  Formail would keep finding them and
reprocessing them and then seeing yet more copies of them as it went along.

If it's the latter, and these messages are for several people, you don't know who the intended recipients are any more, now that the SMTP dialogue information is lost. You could replace procmail in my suggestion above with

 formail -s sendmail -oi guessed(_at_)recipi(_dot_)ent < recyclebox

if you know that they should all go to the same address.


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