procmail
[Top] [All Lists]

Re: I'm getting someone else's mail

1997-11-24 07:36:28
Justin Lloyd <jlloyd(_at_)hisd(_dot_)harris(_dot_)com> wrote (and I
editted slightly) Tue, 18 Nov 1997:
:0 Bh
* -100^0
* 50^1 B ?? Jessetest (Loyd)?
* 50^1 ^(From|cc):.*mailbtest\.harris\.com
! jloydtest(_at_)harris(_dot_)com

Note: 'test' added to above recipe to avoid trigerring the
filter recipe with this discussion.

As it stands, this might forward just the headers (From, To, etc)
to jloyd...  It also might catch messages that just happen to
mention J.Loyd.  You probably want to add a few things:

-begin file-
:0 BH
* -100^0
* 50^1 B ?? Jessetest (Loyd)?
* 50^1 H ?? ^(From|cc).*mailbtest\.harris\.com
! jloydtest(_at_)harris(_dot_)com
-end file-

Note the change to uppercase in the :0 line, and the
removal of the ':' from the From|cc test.  The H and B flags
are documented in 'man procmailrc', and the ':' removal allows
scoring on the first 'From ' line as well as the 'From:' line.
You may also want to move the space in 'Jessetest (Loyd)?' to
inside the parentheses 'Jessetest( Loyd)?', since the original
will not match 'Jessetest.' in the body.

You may want to add some subtractions from the score for
properly spelling your name, including any of your signature,
and also prevent 'error loops' by including !^FROM_DAEMON in the
recipe.  [Preventing mail loops (other than error loops) is in
'man procmailex'.  Look for 'X-Loop:']
e.g.,
* !^FROM_DAEMON
* -50^1 B ?? System Admin
* -52^1 B ?? Justin
* -49^1 B ?? Lloyd

The '-49' is to allow for misspelled lastname of Jessetest to
still be forwarded, unless 'Justin' is also present.

The way I normally fix this sort of thing doesn't actually involve
procmail, except in extreme cases.  My fix is to forward the message
to the proper recipient, as well as to the original sender, with a
message noting that jloyd isn't the same as jlloyd (or in my case
gaurdian not equal guardian)  People will get the point eventually,
since most don't like having their email read by someone who isn't
the intended recipient... And a copy to the sender gives them a
chance to 'reinforce' the correct address.

As of yet, I've had no 'extreme' cases...

No warranty expressed or implied.  Do not use in life-support
applications.

Have a good day,
Laurence
-- 
Do not add me to any mailing lists.  No modification to email
address is necessary to contact me, unless your mailer doesn't
accept 'plussed' addresses, in which case just remove the bit
after the plus.

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