procmail
[Top] [All Lists]

Re: Email forwarding

1996-02-09 07:14:56

en.DE

Hi,

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.

How do I set the recipe so each of them will receive one and only
one copy?


The special "TO" macro maches both To and Cc:, replace it with
^To:(_dot_)*joe(_at_)sibs(_dot_)com
and
^To:(_dot_)*tom(_at_)sibs(_dot_)com

for each one and it will only be delivered to them when they match the
To field. Of course, this is probably not what you want. What you probably
want is to have each user have his own .procmailrc otherwise you're going
to have suboptimal solutions and lots of strange cases.

Or, maybe, you could follow the first recipe with a c and have a duplicate
discard thing as your first recipe like this:

:0 Wh: msgid.lock
| formail -D 8192 msgid.cache

That way, the first one gets delivered, but also passes through to the
next recipe, which also gets delivered. Of course, this becomes suboptimal
if you are only delivering to tom and not joe, because then a local copy
stays there and gets forwarded. I assume the reason you have it forwarded
is because you didn't want local copies, so this is also probably a bad thing.
 Probably easiest to go to two files (as mentioned above)

--
____________________________________________________________________________
Doug Hughes                                     Engineering Network Services
System/Net Admin                                Auburn University
                        doug(_at_)eng(_dot_)auburn(_dot_)edu
                Pro is to Con as progress is to congress

<Prev in Thread] Current Thread [Next in Thread>