[Spambayes] Re: imapfilter mangling headers!

Meyer, Tony T.A.Meyer at massey.ac.nz
Sun Apr 20 15:16:46 EDT 2003

> >> Indeed.  The UI script even has a syntax error (missing a
> >> colon).
> > Well, there aren't any scripts that use the UI module, so 
> > that really shouldn't matter.
> ?!? You can't even invoke the script unless it can be compiled!

That's my point; let me spell it out more: at that stage the ImapUI.py
module (which had the error) was not imported by *any* spambayes module.
Since nothing used it, nothing invoked it, and nothing tried to compile
it.  (Things have changed since, and it does compile, and work, and get
imported by imapfilter.py).

> > And even the trial ones that I haven't checked in
> > don't use that function...
> How did you manage to test them?

I did the testing before the function was added (and I tested that
function without the line that had the syntax error, which, ironically,
was only a test that the previous line worked).  Since the function
wasn't used, I didn't test afterwards since none of the code that was
used had changed.  If the module was used by anything else I would have
done a cursory check that would have picked up the syntax error, but it
really wasn't necessary.

> I wrote a bayescustomize.ini, but the entries seemed to be ignored.

Spambayes might not have been finding it.  It should be found if it is
in the current working directory (although I've found this a little
unreliable sometimes), but it will definitely be found if the path is in
the envar BAYESCUSTOMIZE.  (I'll add this to the docs, too).  It's easy
to test if it's reading it - add some entry that doesn't exist in
spambayes (like "option_does_not_exist: True") and try to run pop3proxy
or imapfilter.  You'll get an error message about an invalid option if
it is finding it.  If it does find it and ignore entries made, then this
is definitely a bug and should be reported (with details about which
entries are being ignored).

> I have serious doubts that I'll be able to run a browser on 
> the machine where I want to do this, so I don't think the web 
> ui will be an option.

Well, I guess then I'll add some documentation (maybe a FAQ) for people
in this situation.  The reason there isn't any yet is that no-one has
said that they can't run a browser but want to use pop3proxy or
imapfilter.  It's probably also been taken for granted that people using
spambayes without the web ui know what a config file looks like, given
that they're using software that hasn't even made it to beta yet.

> > bayescustomize.ini uses the standard configuration format.
> ...which is documented where?

Or just google for ini file format.  Or search for a file suffixed with
.ini or .rc.  Or look at the default_bayes_customize.ini in the
Outlook2000 folder.  Or look in the cvs history of Options.py at the one
that used to be built in there.  (Given that this was the case until a
couple of days ago, it's hardly surprising that newer documentation
hasn't made it yet.  Remember that this is a collaborative, open-source,
voluntary project...things take time...).

=Tony Meyer

More information about the Spambayes mailing list