[Twisted-Python] imap and noop

Darren Syzling dsyzling at gmail.com
Wed Jul 8 16:42:44 MDT 2009


Jean-Paul Calderone wrote:
> You may want to use the IMailboxListener implementation on IMAP4Server to
> handle this case (IMAP4's complicated, I'm not sure this is the right
> direction to pursue, but it's *a* direction :).
>
>   
There seems to be an immediate issue with this approach and Thunderbird. 
The IMAP4Server implementation implements IMailboxListener but only 
subscribes (addListener) to the mailbox during _cbSelectWork - i.e. when 
the folder is selected. Thunderbird creates multiple mailbox instances 
(connections) but doesn't issue a select on all of them. When addMessage 
is called the mailbox instance that's used sometimes happens to be the 
one which has not been 'selected' therefore has no listeners so I can't 
notify the IMAP4Server.

I'll take a look tomorrow to see if anything in IMAP4Server can be 
overriden to add the listener earlier and for my mailbox to ignore a 
listener being registered twice.


Darren




More information about the Twisted-Python mailing list