You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Thomas Deaton <TD...@co.guilford.nc.us> on 2005/05/25 15:48:16 UTC

spam.assassin.prefs.conf "TO:"

For the header rules, you can put Subject or From. Is there a way to put something from the "TO:" line?

thanks


E-mail correspondence to and from this address may be subject to the 
North Carolina Public Records Law and may be disclosed to third parties by an
authorized county official. If you have received this communication in 
error , please do not distribute it. Please notify the sender by E-mail 
at the address shown and delete the original message.

Thank you

Re: spam.assassin.prefs.conf "TO:"

Posted by Matt Kettler <mk...@evi-inc.com>.
Thomas Deaton wrote:
> For the header rules, you can put Subject or From. Is there a way to put something from the "TO:" line?
> 
> thanks

A header rule can be written to examine *any* header. To: From: Subject:
X-SomeGarbageYouNeverSawBefore:. There's even a special meta header "ToCc" which
matches To: or Cc: lines..

Just use To or ToCc instead of From before the = in the rule.. However, be
aware, that the rules work based on what is in the headers. If the recipient is
Bcc'ed and doesn't appear in the headers, your rules can't match it.


header TOCC_MKET        ToCc =~ /mkettler\@evi-inc\.com/i

Some other random header rules from my own custom rules that check other message
headers:

header LOCAL_LIST_SNORT_USERS  List-Id  =~/snort\-users\.lists\.sourceforge\.net/

header INFO_GREYLIST_DELAYED        X-Greylist =~ /Delayed for /

header X_MESSAGE_INFO       exists:X-Message-Info