[Spambayes] IMAP Filter

Meyer, Tony T.A.Meyer at massey.ac.nz
Mon Apr 7 20:28:13 EDT 2003


Ok, I've committed a v1 IMAP filter.  If you execute the script it will
connect to the specified imap server, classify mail in the inbox and
move it to specified unsure or spam folders.  It will also train any
mail in a train_as_ham folder as ham, and similarly a train_spam folder.

This is not at all ready for general use.

In your config file, specify the following options:
* imap_server: server you want to connect to (imap.example.com)
* imap_port: port you want to connect to (defaults to 143)
* imap_username: your username for that imap box
* imap_password: your password for that imap box
* imap_inbox: the folder to filter (defaults to inbox)
* imap_unsure_folder: folder where unsure mail should be put
* imap_spam_folder: folder where spam should be put
* imap_ham_train_folders: list of folders that contain mail to be
trained as ham
* imap_spam_train_folders: as above, but for spam
* imap_expunge: True iff you want an expunge (purge) done on exit
(defaults to False)

The database is the one specified in pop3proxy_persistent_storage_file,
and this will be a pickle/db depending on what
pop3proxy_persistent_use_database is set to.

The script will also add the spambayes headers to mail (so, in fact, you
can just filter on the headers if you would rather).

At the moment, the script has no memory.  I'll add this tomorrow, along
the lines of the pickles stored by the notes filter and outlook plugin
(or maybe the big general picture solution will get finished and I'll
just use that ;)).

It doesn't yet, but it will use the same web ui as pop3proxy to let the
user do all the configuration stuff (another reason to abstract this
out!).

Feel free to take a look at it and make any improvements you want to.
I'll keep working on it tomorrow, and then next week (I'm busy the rest
of this week).

=Tony Meyer



More information about the Spambayes mailing list