procmail
[Top] [All Lists]

Re: Forwarding with old postmark

2000-08-04 13:28:00
Eric Hilding asked,

| I'm still getting an inbox copy of the mail myself which I
| do not want, but rather just to forward as if from original
| sender.  Where is the loose screw?  Thanks.
| 
| :0
| * ^TOdesignatedaddress(_at_)mydomain(_dot_)com
| | formail -R 'From ' Old-Postmark
| !offsiteaddress(_at_)anotherdomain(_dot_)com

You can't put two actions onto one recipe.  Also, the formail syntax is
flawed; the replacement field name for -R has to be complete.

So you could filter it first to save the old postmark and then forward it,

 :0fWh
 * ^TOdesignatedaddress(_at_)mydomain\(_dot_)com
 | formail -R 'From ' Old-Postmark:
  :0a
  ! offsiteaddress(_at_)anotherdomain(_dot_)com

or you could let a shell pipe the output of the filter to the second command:

 :0
 * ^TOdesignatedaddress(_at_)mydomain\(_dot_)com
 | formail -R 'From ' Old-Postmark: | \
   "$SENDMAIL" $SENDMAILFLAGS offsiteaddress(_at_)anotherdomain(_dot_)com
 

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