[Spambayes] Problem with imap under linux.-part 4

Tony Meyer tameyer at ihug.co.nz
Wed Aug 4 05:26:33 CEST 2004


> When I click configure folders to filter I return:
> 
> 500 Server error
> 
> Traceback (most recent call last):
[...]
> 	      File "/usr/bin/sb_imapfilter.py", line 296, in
> 	      folder_list
> 	          m = r.search(fol)
> 
> 		  TypeError: expected string or buffer
[...]
> Clearly there is still somthing I don't understan about this
> interface.

This is a bug, of sorts (or so it appears).  Your IMAP server is returning
something odd from the LIST command, which sb_imapfilter can't handle.  To
debug this, could you run this?

> python
>>> import imaplib
>>> i = imaplib.IMAP4("mail.example.com")
>>> i.login("username", "password")
('OK', ['[CAPABILITY IMAP4REV1 IDLE NAMESPACE MAILBOX-REFERRALS BINARY
UNSELECT SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] User
authenticated'])
>>> i.list()
('OK', ['(\\NoInferiors) NIL INBOX'])
>>> i.logout()
('BYE', ['mail.example.com IMAP4rev1 server terminating connection'])

Substituting your mail server, username and password.  The responses will
differ somewhat - the important one is the second one (to the list command).
The second part is meant to be either a list of folder names, or an IMAP
literal (basically a number then a series of bytes).  It appears that your
IMAP server is going to give back something else.

=Tony Meyer

---
Please always include the list (spambayes at python.org) in your replies
(reply-all), and please don't send me personal mail about SpamBayes. This
way, you get everyone's help, and avoid a lack of replies when I'm busy.



More information about the Spambayes mailing list