On Fri, Feb 02, 2001 at 07:02:01PM +0100, Marc A. Donges wrote: > On Friday, February 02, 2001 at 18:41:16 (+0100), Sven Burgener wrote: > > --8<-- > > :0 > > * ^From: Mail Delivery Subsystem > > | (formail -I "To: [EMAIL PROTECTED]") |\ > > (formail -I "CC: [EMAIL PROTECTED], [EMAIL PROTECTED]") | $SENDMAIL -t > > > > :0 > > ! [EMAIL PROTECTED] > > --8<-- > > The first recipy is a delivering one. This means that if the first > pattern matches, the mail won't get to the second.
True, but ... > If you want to have both actions taken, you must specify the "c" flag > on the first one (":0c" instead of ":0"). ... that wasn't my question. It is not my intention to apply both the formail'ing and the '!' forwarding to one particular email. > Furthermore, your first recipy will almost certainly create > mail-loops: If [EMAIL PROTECTED] cannot be delivered to, the mail will > be bounced to the account that did the above procmail-filtering, in > turn being forwarded to [EMAIL PROTECTED] You should therefore specify > "-f '<>'" on the sendmail-command-line to create a > zero-return-address. Thanks for the info about this issue. I'll take that into account. > Why do you want those headers to appear in the message? I merely want the mail to appear to be destined to "[EMAIL PROTECTED]" instead of the user on the system that has the above .procmailrc file and that receives this email in the first place. Additionally, I want to add a CC: to the message on-the-fly, overwriting an existing one, if there. I must apologise, the above code *does* work. My test scenario / test setup was misleading me. /me blushes Thank you for your time and insight, though. Sven -- "{sum += $2} END {print sum}", said Tom awkwardly.