Ralf Zimmermann
2011-Jun-05 23:27 UTC
[Dovecot] doveadm problem with mail_plugins in database
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I use this user_query: - -------------------------------%<-------------------------------- user_query = SELECT LOWER(CONCAT(t2.login,'@',t1.name)) AS user,t2.home,t2.mail,5000 AS uid,5000 AS gid,CONCAT('*:storage=',quota_mb,'MB') AS quota_rule,t2.acl_groups,case when '%s'='lda' then 'acl quota sieve' when '%s'='lmtp' then 'acl quota sieve' when '%s'='doveadm' then mail_plugins when '%s'='sieve' then 'acl quota' else t2.mail_plugins end as mail_plugins FROM virtual_users as t2, virtual_domains as t1 WHERE ( t2.login='%n' OR t2.email='%u' ) AND t1.enabled IS true AND t2.enabled IS true AND t1.id=t2.domain_id - -------------------------------%<-------------------------------- When I use some doveadm commands I get this error for example: - -------------------------------%<-------------------------------- # doveadm fetch -u rzimmermann "hdr" savedbefore 3d doveadm(rzimmermann): Error: dlopen(/usr/local/lib/dovecot/lib02_imap_acl_plugin.so) failed: /usr/local/lib/dovecot/lib02_imap_acl_plugin.so: undefined symbol: client_fail_mailbox_name_status doveadm(rzimmermann): Error: Can't load plugin imap_acl_plugin: Plugin is intended to be used only by imap binary (we're doveadm) doveadm(rzimmermann): Fatal: Couldn't load required plugins - -------------------------------%<-------------------------------- Some doveadm commands runs fine. Here a example: - -------------------------------%<-------------------------------- # doveadm user rzimmermann userdb: rzimmermann home : /var/vmail/virtusers/boardfreunde.de/rzimmermann mail : maildir:~/Maildir uid : 5000 gid : 5000 quota_rule: *:storage=4000MB acl_groups: admins,boe-admins mail_plugins: quota imap_quota acl imap_acl autocreate fts fts_squat - -------------------------------%<-------------------------------- If I change the user_query part "'%s'='doveadm' then mail_plugins" to "'%s'='doveadm' then 'acl quota" all works fine, but I get a wrong mail_plugin output: - -------------------------------%<-------------------------------- userdb: rzimmermann home : /var/vmail/virtusers/boardfreunde.de/rzimmermann mail : maildir:~/Maildir uid : 5000 gid : 5000 quota_rule: *:storage=4000MB acl_groups: admins,boe-admins mail_plugins: acl quota - -------------------------------%<-------------------------------- What can I do to get doveadm working with "'%s'='doveadm' then mail_plugins"? Or must I use "'%s'='doveadm' then 'acl quota" in the user_query? I use dovecot 2.0.13. Greets Ralf -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAEBAgAGBQJN7BDnAAoJENVjhbwuX+/H6F4H/ROB/J4/icebgAQdpqQxYgDt PEUR87dlgIufQWT7KVyYVYBxzfjRqk20+f/Djpxy6RGl2jVHajvtOpsovQQz92Dy C1ulagZ2mimhbP8qa6VSh3Ozjv9xASbXDJHEDhSR3i45V0bPFpN1resaP8pHHJkl bdvqrdXlvIdMvJ83fSTcElMdIrmg0wyUJMTB900NVkvndlGO1xs1vtfv2c+PhNDe 9nq9Vs2/uVt7NO6ct/d9tqd57X5fzqxzIvjWWCIyHB38W6KgNFM6TiHI1WtSFsKn 4UOcE9FKmePq17ugaj1yrn0gmOSgU1TqnSjRwEM0xoteUlio2NsuhzFSVojkq9s=NzcM -----END PGP SIGNATURE-----
Timo Sirainen
2011-Jun-06 14:38 UTC
[Dovecot] doveadm problem with mail_plugins in database
On Mon, 2011-06-06 at 01:27 +0200, Ralf Zimmermann wrote:> I use this user_query:..> # doveadm fetch -u rzimmermann "hdr" savedbefore 3d > > doveadm(rzimmermann): Error: Can't load plugin imap_acl_plugin: Plugin > is intended to be used only by imap binary (we're doveadm)The user_query returns mail_plugins setting that includes imap_acl plugin. Which of course can't be loaded since doveadm isn't imap..> Some doveadm commands runs fine. Here a example: > > - -------------------------------%<-------------------------------- > # doveadm user rzimmermannThe problem happens only for doveadm commands that access mail storage. (The setting is mail_plugins - the plugins are irrelevant for non-mail commands.)> What can I do to get doveadm working with "'%s'='doveadm' then > mail_plugins"? Or must I use "'%s'='doveadm' then 'acl quota" in the > user_query?Well, the way I'd do it is something like (I don't know if this is valid SQL): concat(mail_plugins, case '%s'='lda' then ',sieve' case '%s'='lmtp' then ',sieve' case '%s'='imap' then ',imap_quota' ) AS mail_plugins Assuming everyone is using quota. If not, then change the imap part to check if mail_plugins contains quota and add imap_quota only if it does.