Re: .procmailrc multiple actions
On Friday, February 02, 2001 at 18:41:16 (+0100), Sven Burgener wrote:
> * ^From: Mail Delivery Subsystem
> | (formail -I "To: firstname.lastname@example.org") |\
> (formail -I "CC: email@example.com, firstname.lastname@example.org") | $SENDMAIL -t
> ! admin@localhost
The first recipy is a delivering one. This means that if the first
pattern matches, the mail won't get to the second.
If you want to have both actions taken, you must specify the "c" flag on
the first one (":0c" instead of ":0").
Furthermore, your first recipy will almost certainly create mail-loops:
If email@example.com cannot be delivered to, the mail will be bounced to
the account that did the above procmail-filtering, in turn being
forwarded to firstname.lastname@example.org. You should therefore specify "-f '<>'" on
the sendmail-command-line to create a zero-return-address.
Another problem exists in the recipy. Strange things, that you will not
understand at first glance will happen, if the rewritten Mail contains
any Resent-(To|Cc|Bcc):-Headers. They take precedence over the
(To|Cc):-headers you are inserting.
Why do you want those headers to appear in the message?
_ _ Marc A. Donges +49 791 51804
/ \ PGP-Key(DSA): 1024D/1C9ECFF2
Fingerprint: 58B9 07A6 CBB1 7016 EB1D 7D35 EEBE 67DC 1C9E CFF2