Wotan <wotan(_at_)netcom(_dot_)com> writes:
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
What do you mean by "just as well"? The above will match
To: debts81(_at_)somewhere(_dot_)else
While the former wouldn't. Personally, I'd recommend the following:
:0:
* ! ^(To|Cc):(.*[^-a-zA-Z0-9_.])?bts8(@([-a-z0-9]+\.)*netcom\.com)?(,|$)
not-to-me
The bit before "bts8" comes from the ^TO_ token expansion, while the bit
after will match an optional host part that ends in "netcom.com". Is that
exact enough and understandable enough?
Of course, this'll still have problems if someone has
"bts8(_at_)netcom(_dot_)com"
in a comment in their address, but that's more likely to be malicious
as opposed to accidental which is what I think we're mainly seeking to
avoid problems with.
The Bcc is not needed since Netcom strips it off before delivery. :(
*Everyone* strips it off. You should *never* see a Bcc: header in incoming
mail.
Philip Guenther