[Spambayes] How to tell SpamBayes to check more headers (using MSOplugin)

Tony Meyer tameyer at ihug.co.nz
Tue Nov 18 17:47:30 EST 2003


> Is there a way, without hacking the source, to tell SpamBayes 
> to examine more of the headers in mails? In particular these 
> ones, added by SpamAssassin and SpamCop Mail:

You can add to the 'safe_headers' option (in the 'Tokenizer' section).  This
means that you'll get tokens generated indicated the number of times a
header line appears in the mail (so you'd get a "header:x-spam-level:1"
token, for example), and possibly (depending on your settings), a token if
the header is absent (like "noheader:x-spam-status").

> X-Spam-Level: *********
> X-Spam-Status: hits=9.7 tests=ADDR_NUMS_AT_BIGSITE,BIZ_TLD,
> 	DATE_IN_FUTURE_12_24,FORGED_HOTMAIL_RCVD,FORGED_MUA_OUTLOOK,
> 	MSGID_FROM_MTA_HOTMAIL,USERPASS version=2.60
> X-SpamCop-Disposition: Blocked bl.spamcop.net

However, if these headers appear for both ham and spam, and it's just the
contents of the headers that varies, then this isn't going to do you much
good.  In that case, you'd have to add code to tokenizer.py (in the
tokenize_headers function) to add specific tokens for SpamAssassin and
SpamCop.  (If you do, please submit a patch).

There has been discussion of this sort of thing before (googling though the
archives would probably find it easily enough); IIRC, there were arguments
that the classifications should stay separate, and it would be more
effective to have a final rule based on a combination of the
classifications.

> I'm using the Outlook plugin if that makes a difference.

It means that you change your (low-level) options via the
default_bayes_customize.ini file in your data directory (not the one in the
program files directory).

=Tony Meyer




More information about the Spambayes mailing list