Timo Sirainen schrieb:
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.)
Ok. Your suggestion makes sense. If you would do it that way, I'm happy to test with different (Outlook, OE, etc.) clients to crosscheck if they've got a problem with that and, if not, honor new capabilities.
Regards, Sebastian