[Dovecot] doveadm problem with mail_plugins in database

Timo Sirainen tss at iki.fi
Mon Jun 6 17:38:21 EEST 2011


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 rzimmermann

The 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.



More information about the dovecot mailing list