On 3/22/2010 9:11 AM, Joseph Brennan wrote: > > >> header __MY_FILTRAGE_TO_93 To =~ /\...@exxent\.net/i > > > This matches if @exxent.net is in the "To:" header line. It doesn't > match all mail sent to recipients at exxent.net-- 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: "j...@irs.gov"<bad...@example.com>, :addr will extract the example.com address, not the irs.gov part. This might be overkill, but there are situations where it is useful. header __MY_FILTRAGE_TO_93 To:addr =~ /\...@exxent\.net/i