[Spambayes] imapfilter repeat proble

Tim Stone - Four Stones Expressions tim at fourstonesExpressions.com
Mon Apr 28 10:03:47 EDT 2003


4/28/2003 9:46:45 AM, Oliver Maunder <lists at olivermaunder.co.uk wrote:

>Just been running imapfilter with the -l flag to get it to periodically 
>classify my inbox. The second round of classifying caused an error:
>
>       "imaplib.error: command LOGIN illegal in state LOGOUT"
>
>Clearly, logging out after the initial round of classifying has left the 
>imap object in the LOGOUT state, and it doesn't want you to log in when 
>it's in that state. Personally I think that's probably an error in 
>imaplib (what else are you going to do with a logged out object other 
>than log in again?) .
>
>In the meantime there's a simple fix - move the line where the 
>IMAPSession is created inside the while loop, so a new IMAPSession is 
>created on each pass.
>e.g. - line 633, imapfilter.py
>    while True:
>          imap = IMAPSession(server, port, imapDebug, doExpunge)
>          imap.login(username, pwd)
>          ...
>
>I still don't know much about python. Will the old IMAPSession object 
>will be cleaned up properly if I do this?

It should be...  I'll make that change.  It makes sense anyway, because we 
shouldn't keep a socket tied up during a sleep time.
>
>Olly
>
>
>
>_______________________________________________
>Spambayes mailing list
>Spambayes at python.org
>http://mail.python.org/mailman/listinfo/spambayes
>
>


c'est moi - TimS
http://www.fourstonesExpressions.com
http://wecanstopspam.org

There are 10 kinds of people in the world:
  those who understand binary,
  and those who don't.





More information about the Spambayes mailing list