procmail
[Top] [All Lists]

Re: Trying to bounce mail after-the-fact with procmail/formail

2001-11-06 11:17:49

Hmm.  Yeah, I guess it's probably not the best method.  But if he's
careful and is sure that none of the messages contain external addresses
in their To and CC lines, it should be safe.

Since the exercise is merely to get procmail to see the messages in
order to auto-generate the bounces, how about:

# cat mailbox | formail -I "CC:" -I "To: me(_at_)example(_dot_)com" -s sendmail 
-t

Eliminate the CC, replace the To with my own address (ensuring that the
MTA will deliver to procmail as the user we want), and fire it off.

Other than the extra processor time and the inconsistency of MTAs, is
there a reason why it would be better to run this through procmail
directly rather than letting the MTA handle it?


On Tue, Nov 06, 2001 at 02:36:22PM +0000, Martin McCarthy wrote:
From: Martin McCarthy <marty(_at_)ancient-scotland(_dot_)co(_dot_)uk>
To: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: Trying to bounce mail after-the-fact with procmail/formail
Date: Tue, 6 Nov 2001 14:36:22 +0000

One tip that wasn't mentioned was ... to have your MTA reprocess every
message in a mailbox based on the header information, you can probably:

# cat mailbox | formail -s sendmail -t

I haven't actually tried this, so you should test this on a small box
of dummy messages to yourself before trying it on the big mailbox.

Oops!  Careful!

"sendmail -t" will cause all those mails in 'mailbox' to be sent to all
the recipients specified in the 'To:' and 'Cc:' lines.  For example, if
'mailbox' contains this message then it would be resent to the procmail
mailing list (from the To: line) and all the people to whom I might've
copied it (from the Cc: line) but not to me (from the From: or Sender:
lines) which is probably where you think you want to send it (although
not really where you want to send it because you really want the lost
envelope information).

Martin
-- 
Martin McCarthy                 /</                  PGP key available
    `Procmail Companion'        \>\  http://www.ancient-scotland.co.uk
     Addison Wesley             /</    http://www.ehabitat.demon.co.uk
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Development / Abuse / Whatever       vox: +1 416 598-0000
  IT Canada                                            http://www.it.ca/

_______________________________________________
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>