procmail
[Top] [All Lists]

Re: perl script to remail contents of mbox file

2004-06-10 21:04:09
On Thu, Jun 10, 2004 at 08:07:10PM -0700, Professional Software Engineering 
wrote:
At 14:07 2004-06-10 -0600, Scott Wiersdorf wrote:
If delivery just went seriously wrong (i.e., you have external
recipients), the -t flag for sendmail will cause it to read the
message for To:, Cc:, etc. headers and try delivery on those messages
again.

INCLUDING WHEN THOSE RECIPIENTS ARE NOT EVEN LOCAL!

Certainly! :)

Any action as a sysadmin should be taken with extreme caution; I
wouldn't advocate recklessness at any time.

It is possible (not knowing precisely the circumstances of the
original problem) that this was a relay server and that local and
non-local recipients alike did not receive mail from a boo-boo in some
procmailrc file (I'm thinking of a time when I used sendmail's
LOCAL_RULE_0 to futz with mail as it was relayed out; a disaster there
could cause this kind of situation). Such a crisis would call for
sendmail to handle the mail again (with caution, of course).

After a quick glance at the Perl program written by Jeff (which is a
nice piece of work, btw, Jeff. We're a plain-speaking bunch--no
sugar-coating here, but don't take it personally), it seems that the
intent of the program was several-fold, depending on the options given
to the program:

  1) reprocess mail, resending to all recipients (remail.pl mbox)
  2) reprocess mail, resending to only local recipients (remail.pl -l mbox)
  3) bounce mail to a new recipient (remail.pl -r new(_at_)recipient(_dot_)tld 
mbox)

All three purposes were met by various people on this list (look in
the archive; you know who you are):

  1) formail -s sendmail -oi -t < mbox.renamed
  2) formail -s procmail < mbox.renamed
  3) formail -s sendmail -oi new(_at_)recipient(_dot_)tld < mbox.renamed

Scott
-- 
Scott Wiersdorf
scott(_at_)perlcode(_dot_)org

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