On 20.8.2012, at 14.47, Angel L. Mateo wrote:
The origin of the problem why lmtp didn't use user's mail_plugin is that I had it configured it in the pass_attrs option (and read with prefetch) and not in user_attrs, so lmtp didn't get it.
But now the problem is that I can't configure mail_plugins redefinition per user with 'quota,imap_quota' because when it is get it for lmtp, it produces the error
Aug 20 13:38:30 myotis30 dovecot: lmtp(1086): Error: dlopen(/usr/lib/dovecot/modules/lib11_imap_quota_plugin.so) failed: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: undefined symbol: client_send_tagline
and if I configure mail_plugins redefinition with just 'quota' then it is no applied for IMAP connections.
You can't do it with one passwd-file, you'd have to use multiple per-protocol passwd files.. For example:
userdb passwd-file { args = /etc/dovecot/passwd.%s }
Yeah, passwd-files aren't very flexible for things like these. Maybe you should look into using sqlite? It probably allows some if() or case() in the query (I haven't used sqlite).