spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Kettler <>
Subject Re: Rules correct ?
Date Tue, 23 Mar 2010 02:26:23 GMT
On 3/22/2010 9:11 AM, Joseph Brennan wrote:
>> header    __MY_FILTRAGE_TO_93      To =~ /\@exxent\.net/i
> This matches if is in the "To:" header line.  It doesn't
> match all mail sent to recipients at only mail with their
> address in the "To:" header line.
> Of course this may be exactly what you want to do.
True, you could change it to ToCc =~ if you wanted to match both To: and
Cc: headers.

header    __MY_FILTRAGE_TO_93      ToCc =~ /\@exxent\.net/i

Not much you can do for BCC'ed mail (or mailing list mail) though.

Another thing which might be useful would to be to add the :addr
modifier. This will cause it to match the email address part of the
header, but not the descriptive text part. However, beware that the
:addr modifier limits you to only one address, so it makes ToCc
useless.  In: ""<>, :addr will extract the address, not the part. This might be overkill, but
there are situations where it is useful.

header    __MY_FILTRAGE_TO_93      To:addr =~ /\@exxent\.net/i

View raw message