[Dovecot] Capability problems dovecot 2.0

Timo Sirainen tss at iki.fi
Wed May 27 09:57:12 EEST 2009


On May 27, 2009, at 2:48 AM, reg9009 wrote:

> Hmm, that's indeed a problem. Well, for the plugins depending on
> different users I don't have an answer. But I think TB is using the
> capability command again after login. I'll check.

It's not, but if it's force-fed the new capability it'll use it.

> For gathering the capabilities of plugins, etc. Would it be a viable
> solution to demand the plugins to pass capabilities at the point where
> the plugin registers/loads itself? That way it may not be that ugly?

The problem is that Dovecot's IMAP code is split to pre-login and post- 
login processes. The pre-login processes don't load any plugins, only  
the post-login processes do. But the capability is needed in the pre- 
login process. So the way it works with v1.x is that when you start  
dovecot it'll execute the imap post-login binary with a "dump- 
capability" flag enabled, which basically loads the plugins and tells  
the current capability string to Dovecot master process. This has  
caused all kinds of problems in past and I'm sure as there will be  
more trouble with that in future.

The alternative that I'm thinking right now is that in the pre-login  
process Dovecot would only advertise those capabilities that are  
actually useful before login. Then after login it would send an  
updated capability reply to the client. The important question here  
is: Are there any clients that don't update their capabilities? So far  
I've tested Apple Mail, Thunderbird and Alpine and they're fine with  
it. The most important question here is do Outlook and OE update that  
list? (Or does OE use any extensions anyway? Outlook uses IDLE anyway.)



More information about the dovecot mailing list