procmail
[Top] [All Lists]

Re: Need Help with recipe

1998-02-09 16:24:22
On Mon, 9 Feb 1998, Erdy Suarez wrote:

= Hello,
= 
= My name is Erdy Suarez. I'm a HPUX sys admin who is trying to set up procmail
= as an MDA. I must admit that I am a novice at procmail and sendmail.
= 
= I am having a problem with my recipes in my /etc/procmailrc and would 
appreciate
= any help anyone could give. What I would like to be able to do, through the
= /etc/procmailrc in our mail server, is to capture a user's mail and properly
= redirect it to his/her desktop computer's server.
= 
= My problem is that if I have two entries(two users) in my /etc/procmailrc, 
then
= each user receives two copies of the same e-mail, and if I have 3 entries, 
they
= each receive 3 copies, and so on. 
= 
= My receipes are as follows:
= 
= #Start of user recipes
= 
= :0 c :
= * ^(To:|Cc:)(_dot_)*bonehead(_at_)tleilax
= ! bonehead(_at_)redwolf(_dot_)cup(_dot_)hp(_dot_)com

The use of c means that a carbon copy is to be made, a local delivery
not withstanding.  Also I think that using the special token TO may
be warranted here.

In general a better way to do this would be to use aliases.  This
is intrinically more efficient.  That is your alias file
on Tleilax would have entries such as:
bonehead        boneheat(_at_)redwolf(_dot_)cup(_dot_)hp(_dot_)com
w.smith         billy(_at_)aardvark(_dot_)cup(_dot_)hp(_dot_)com
morgon          jm(_at_)peanut(_dot_)butter(_dot_)hp(_dot_)com
..

= 
= :0 c :
= * ^(To|Cc):.*suarez
= ! suarez(_at_)redwolf(_dot_)cup(_dot_)hp(_dot_)com

This recipe would also catch a user named
asuarez jmsuarez suarezeq 
and it would also catch suarez if it occured anywhere in the address.

If you want to search on user name only, be sure to put the @ in
as part of your name.  E.g.

:0:
* ^TO\<suarez@
! suarez(_at_)redwolf(_dot_)cup(_dot_)hp(_dot_)com

the \< matches a non word [^a-zA-Z0-9]



Sherwood Botsford       | email 
avatar(_at_)vega(_dot_)math(_dot_)ualberta(_dot_)ca
Sorcerers Apprentice    | Office CAB 642B
System Administrator    | Tel: 403 492 5728 
Trouble shooter         | Fax: 403 492 6826

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