procmail
[Top] [All Lists]

Re: old forwarding question

1996-12-11 12:33:11
I currently have a procmail forwarding which looks like that:

:0
* ^TO_gonzo(_at_)me(_dot_)com
! realaddress(_at_)blah(_dot_)com
 
:0
* ^TO_alonzo(_at_)me(_dot_)com
! realalonzo(_at_)xxx(_dot_)com
 
:0
* ^TO_fozzie(_at_)me(_dot_)com
! realfozie(_at_)yyy(_dot_)com


But of course, this is a bit primitive... When a message is sent to both 
'gonzo' and alonzo' (TO: gonzo(_at_)me(_dot_)com, alonzo(_at_)me(_dot_)com), 
the first one coming in 
is forwarded to gonzo, and the second one to...gonzo again!.. Which is 
perfectly normal, given these recipes.

Why not just change them to:

:0
* ^T[O|o]: gonzo(_at_)me(_dot_)com
! realaddress(_at_)blah(_dot_)com

:0
* ^T[O|o]: alonzo(_at_)me(_dot_)com
! realalonzo(_at_)xxx(_dot_)com

:0
* ^T[O|o]: fozzie(_at_)me(_dot_)com
! realfozie(_at_)yyy(_dot_)com

You don't really need the more general ^TO_ or even ^TO.  The above
should also take care of any mailer which instead of the standard
To: , writes out a TO: instead.

Almost any mailer that I know of (admitted not many, only elm, Mail, mailx)
puts a space between the : and the first character of the recipient
address.  So the above should be sufficient for you and no one
will get the same msg twice.

There are other regex games that you can play for more generality,
but this is the simplest one that should work.

Note, in your setup, anyone that's CC (or Cc)-ed to won't get any
email.  The man page should tell you why (delivering recipe, that is).

Regards,

Chin Fang
fangchin(_at_)jessica(_dot_)stanford(_dot_)edu

A quick and dirty fix would be to have ':0c' instead of ':0'. In this case, 
the first message coming in would be sent both to gonzo and alonzo, as well 
as 
the 2nd one. That means they would get the same msg twice.

Is there a solution to this problem? How could I avoid sending the same msg 
twice?

Thanks a lot!
--Pierre


--MimeMultipartBoundary--


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