On Fri, 9 Feb 1996 jzc(_at_)sibs(_dot_)com wrote:
I am using following recipes to do email forwarding:
:0
* ^TOtom(_at_)sibs(_dot_)com
! sibs(_at_)styx(_dot_)ios(_dot_)com
:0
* ^TOjoe(_at_)sibs(_dot_)com
! joet(_at_)styx(_dot_)ios(_dot_)com
When someone send an email:
To: tom(_at_)sibs(_dot_)com
cc: joe(_at_)sibs(_dot_)com
Tom gets two copies and Joe gets nothing.
It seems to me that a message with these headers:
To: tom(_at_)sibs(_dot_)com
Cc: joe(_at_)sibs(_dot_)com
And your recipes would match on the first recipe
and then be forwarded to tom once (does it really get
forwarded to him twice?).
How do I set the recipe so each of them will receive one and only
one copy?
To get it to fall through to the second recipe
you need to tell procmail to continue processing
the message using:
:0 c
If you really are trying to do mail routing to
tom and joe, you also need to check for
Received:.*for tom(_at_)sibs(_dot_)com
in order to catch Bcc'd mail.
To prevent having all messages also show up in
the default inbox, you could test each case,
e.g.,:
Case 1: To contains only tom
Cc contains nothing
Case 2: To contains only joe
Cc contains nothing
Case 3: To contains only joe and tom
Cc contains nothing
Case 4: To contains nothing
Cc contains only joe and tom
Case 5: To contains only joe
Cc contains only tom
Case 6: To contains only tom
Cc contains only joe
If there are more than 2 users at sibs.com then the
number of cases becomes astronomical. As Soren
said, it's best to use sendmail!
Good luck,
Nancy