procmail
[Top] [All Lists]

Re: Redelivering mail

2000-08-30 16:02:16
Kip Turk asked,

| I've got a recipe to deliver certain invalid messages to a new
| recipient.  It works correctly, but I'd like the old headers to show in
| the body of the new message.  Currently they are being turned to
| Old-whatever and hidden in the true headers.  This will be so that Tech
| Support can easily spot who is using the invalid address with their
| virtual domains.  Here is what I have so far:
| 
| SENDMAIL=/usr/sbin/sendmail

1. Procmail's default assignment for $SENDMAIL should be the right one; why
   are you overriding it?

| :0H:

2. `H' without `B' is the default.
3. You're asking for a local lockfile (without supplying a name and without
   providing procmail with a way to infer a name) on a recipe that doesn't
   need any locking.

| * ! ^TO_sales@(mail2\.wcc\.net|wcc\.net|angelofleet\.com)
| | formail -i"Subject: Attempt to send to sales(_at_)invalid \
|   domain" -i"To: support(_at_)wcc(_dot_)net" | $SENDMAIL -oi -t 
-froot(_at_)wcc(_dot_)net

So, let's have at it, and let's include Collin's recommendation to leave the
To: line alone:

  :0hwf # put duplicate copy of head at top of body
  * ! ^TO_sales@(mail2\.wcc\.net|wcc\.net|angelofleet\.com)
  | sed -e H -e /^$/G
   :0A
   | formail -i"Subject: Attempt to send to sales(_at_)invalid domain" | \
     $SENDMAIL -oi -froot(_at_)wcc(_dot_)net support(_at_)wcc(_dot_)net


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