procmail
[Top] [All Lists]

Re: Mail addressed to me

1997-01-16 22:03:38
On Thu, 16 Jan 1997, Tim wrote:

I've been using the following recipe to filter out mail that is not 
specifically addressed to me:

:0:
* !^(To|cc|bcc):(.*[^a-z])?bts8\(_at_)netcom(_dot_)com
not-to-me   

This seems to work OK for mail originating outside of netcom but for some 
reason, mail that originates on netcom gets matched by this recipe.  Can 
someone help me improve this?  I think this may have something to do with 
the fact that if I send a message to someone on netcom, I only have to 
put their username.   The mail system adds the "@netcom.com" part for 
me.  Thanks.

That is because mail from a local user at NetCom to another local user at
NetCom can be specified without a domain, so what we should do is allow
emails "to" you without the domain.  Here's how I'd do it:

      :0:
      * !^(To|cc|bcc):.*[^a-zA-Z0-9]?bts8(\ \(.*\)|@netcom)
      not-to-me

As one who beleives in KISS, this will work just as well:

       :0:
       * !^(To|cc):.*bts8
       not-to-me     

The reason he wouldn't want to use the TO macro, is because it will match
on things such as Apparently-To, which would defeat the purpose of this
recipe.

The Bcc is not needed since Netcom strips it off before delivery. :(

-- 
There's no room in the drug world for amateurs.

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