[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: .procmailrc multiple actions

On Friday, February 02, 2001 at 18:41:16 (+0100), Sven Burgener wrote:
> --8<--
> :0
> * ^From: Mail Delivery Subsystem
> | (formail -I "To: user1@domain.com") |\
>   (formail -I "CC: user2@domain.com, user3@domain.com") | $SENDMAIL -t
> :0
> ! admin@localhost
> --8<--

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 user1@domain.com cannot be delivered to, the mail will be bounced to
the account that did the above procmail-filtering, in turn being
forwarded to user1@domain.com. 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
  'v'                   <Donges@gmx.de>
 /   \               PGP-Key(DSA): 1024D/1C9ECFF2
  W W
 Fingerprint: 58B9 07A6 CBB1 7016 EB1D  7D35 EEBE 67DC 1C9E CFF2

Reply to: