[Spambayes] Re: unsure,Re: [spambayes-dev] wish from new user

Tony Meyer tameyer at ihug.co.nz
Wed Apr 28 20:46:25 EDT 2004


> In your .ini file  you can add/change (depending of what you have 
> aready) the [Headers] section to
> 
> [Headers]
> include_score:True
> notate_to: ham_what_you_want_here
> header_ham_string:  what_you_want_here

Note that these strings will need to be identical.  The
header_[spam|ham|unsure]_string options can be whatever you like; the
notate_to/notate_subject options must be a list of strings exactly matching
the header_X_string options.

For example, with the defaults, you have:

header_ham_string: ham
header_spam_string: spam
header_unsure_string: unsure

And notate_to can be (eg):

notate_to: ham
notate_to: spam,unsure

I presume you want something like:

header_ham_string: my_ham_string
header_spam_string: my_spam_string
header_unsure_string: my_unsure_string

And notate_to can be (eg):

notate_to: my_ham_string
notate_to: my_spam,my_unsure_string

Changing the header_X_string options isn't exposed by the web interface
because it's considered even more advanced an option than the options on the
advanced configuration page.  It's not generally required (a few Outlook
Express users are the exception), and it's (as a result) had little testing,
although it should work fine.

Note: it's possible (likely) that if you make these changes, you'll get a
warning (in the log) that you are using invalid values for the
notate_to/notate_subject options, and they'll have no effect.  This is
because the valid values for those options are fixed to "ham", "spam",
"unsure", or some combination thereof.  I'll check in a fix for this, but
for the moment you will actually have to alter the Options.py file if you
want to do this (filtering on "spam," (note the comma) would really be a
much cleaner solution, any unlikely to result in many false positives).

To alter the Options.py file in the binary distribution, you'll have to get
a copy of the source file (you can do this either by downloading the source
1.0b1 distribution or via sourceforge's web CVS system
<http://sf.net/projects/spambayes>).  Search for "notate_to" and at the end
of the section you'll see a line that has "ham", "spam" and "unsure".
Change these to whatever you want to use instead.  You'll then have to find
the spambayes.zip file in the lib directory in the directory you installed
SpamBayes into.  Open this zip file and remove the Options.pyc file inside
it.  Add the spambayes/Options.py file (making sure that you add it so that
the path includes the "spambayes" directory) to the archive.

In other words, it's a very complicated process.  Instead, you could run
from source.  Just grab the source distribution, change the Options.py file,
and you're done.

=Tony Meyer




More information about the Spambayes mailing list