[Spambayes] imap4 filter

Tony Meyer tameyer at ihug.co.nz
Mon Dec 29 21:10:37 EST 2003


> Hmm.  I tried 1.0a7 and it works here.  Do the folder names 
> on your imap server have an odd character in them?  
[...]
> I got a long listing of folders:  there are probably more 
> than a thousand on the server. 

Ah, didn't expect that.  I presume this is some sort of IMAP setup where
there are shared folders (or you are very organised <wink>).  The interface
isn't going to be all that fantastic in this case anyway, since you'll be
presented with a *huge* webpage to choose the filter folders from.  To get
around this, the page would have to be redesigned to expand folders into
subfolders, or something like that - far too much work at the moment, I'm
afraid.

I suspect that the best thing for you to do will be to simply add the
appropriate folders to your configuration file manually.  You need to have
this sort of thing:
"""
[imap]
filter_folders:folder/name here,second/folder here/as necessary
unsure_folder:folder/to/put/unsure messages/in
spam_folder:folder/to/put spam messages/in
ham_train_folders:folders/with,existing/ham/to,train/on
spam_train_folders:folders/with,existing/spam/to/train/on
"""

(i.e. comma separated lists, using full path).

> I dont think any have "<" or ">" characters.  
> They do have "-" though.

Hmm.  With so many, no doubt this is the problem.  It should really avoid
it, anyway.  I'll check in this fix - you can apply it locally and let me
know if it works if you like, or do the above.

1. After line 44 ("import re") add the line "import urllib"
2. Somewhere around line 268 is the line "        for folder in
available_folders:".  After this line add the line "            folder =
urllib.quote(folder)".

I suspect this will fix it.  If not, it should be done, anyway, so no harm
done..

=Tony Meyer




More information about the Spambayes mailing list