> On 2015-03-29, at 10:16 AM, Gedalya <gedalya at gedalya.net> wrote: > > This problem can be reproduced in one second. Here you go: > > protocol lmtp { > mail_plugins = $mail_plugins sieve imap_quota > } > > Mar 29 13:13:33 mail dovecot: lmtp(25315): Connect from local > Mar 29 13:13:33 mail dovecot: lmtp(gedalya at gedalya.net): Error: Couldn't load required plugin /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: dlopen() failed: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: undefined symbol: command_unregister > > Simple: imap_quota is not a plugin for lmtp, it is a plugin for imap. Notice the last bit of the error message. It won't work just like you couldn't dynamically load it into LibreOffice or whatever.Thank you for pinpointing the issue. Unfortunately, I am at a lost then as to why it fails for me. My settings are as follows : 10-mail.conf : mail_plugins = $mail_plugins zlib quota 15-lda.conf : mail_plugins = $mail_plugins sieve 20-imap.conf : mail_plugins = $mail_plugins imap_zlib imap_quota antispam 20-lmtp.conf : mail_plugins = $mail_plugins sieve Am I to remove each $mail_plugins and then explicitly set each mail_plugins = ""? Looking at my doveconf -n file I posted originally, I do see the following : protocol lmtp { mail_plugins = " zlib quota imap_zlib imap_quota antispam sieve" } And checking the doveconf - n output right now on the server I see the same as above (I was checking in case I had attempted changes since my original post, but nothing has changed). So, either due to a bug or working as intended (or possibly, both), my lmtp protocol section is loading all $mail_plugins. Is it correct to theorize that if the file 20-lmtp.conf were to be renamed so that it was numbered between 16 and 19, that this $mail_plugins problem would be resolved? Or should I rename 20-imap.conf and 20-pop3.conf (I have not enabled POP3 as of yet), to higher digits (e.g. : 21-imap.conf and 21-pop3.conf)? If renaming the conf files to higher digits will fix this for me, I am inclined to do so to the imap and pop3 conf files. :) If this is a bug, is this the ubuntu package at fault, or something further up the chain? --
On 03/30/2015 07:05 AM, rooster wrote:> 10-mail.conf : mail_plugins = $mail_plugins zlib quota > > 15-lda.conf : mail_plugins = $mail_plugins sieve > > 20-imap.conf : mail_plugins = $mail_plugins imap_zlib imap_quota antispam > > 20-lmtp.conf : mail_plugins = $mail_plugins sieve > > Am I to remove each $mail_plugins and then explicitly set each mail_plugins = ""? Looking at my doveconf -n file I posted originally, I do see the following : > > protocol lmtp { > mail_plugins = " zlib quota imap_zlib imap_quota antispam sieve" > } > > And checking the doveconf - n output right now on the server I see the same as above (I was checking in case I had attempted changes since my original post, but nothing has changed). > > So, either due to a bug or working as intended (or possibly, both), my lmtp protocol section is loading all $mail_plugins. > Is it correct to theorize that if the file 20-lmtp.conf were to be renamed so that it was numbered between 16 and 19, that this $mail_plugins problem would be resolved? Or should I rename 20-imap.conf and 20-pop3.conf (I have not enabled POP3 as of yet), to higher digits (e.g. : 21-imap.conf and 21-pop3.conf)? If renaming the conf files to higher digits will fix this for me, I am inclined to do so to the imap and pop3 conf files.:) > > If this is a bug, is this the ubuntu package at fault, or something further up the chain?The order in which the config files are included and parsed ought not to matter. Dovecot parses the entire config, resulting in what you see in doveconf -n output, before it does anything. Only the final result applies. If your config file says: key = value1 key = value1 value2 (or, key = $key value2 - same thing) Then key = value1 value2, and that and only that ever matters. I have a suspicion as to what your issue is. Here is a clarification. Dovecot has only one single config file - the result of concatenating all files as included out of the dovecot.conf file. The names of the individual files in conf.d are technically meaningless. The config is organized into topics only to make it easier to humans to find their way around. The way to apply a setting to a specific component is to put it under a section such as: protocol imap {}. You've mentioned that you have different mail_plugins settings in different _files_, but are you sure they are always inside the protocl xxx {} section?
> On 2015-03-30, at 4:24 AM, Gedalya <gedalya at gedalya.net> wrote: > > The order in which the config files are included and parsed ought not to matter. Dovecot parses the entire config, resulting in what you see in doveconf -n output, before it does anything. Only the final result applies. > > If your config file says: > > key = value1 > key = value1 value2 (or, key = $key value2 - same thing) > > Then key = value1 value2, and that and only that ever matters. > > I have a suspicion as to what your issue is. > > Here is a clarification. Dovecot has only one single config file - the result of concatenating all files as included out of the dovecot.conf file. The names of the individual files in conf.d are technically meaningless. The config is organized into topics only to make it easier to humans to find their way around. > > The way to apply a setting to a specific component is to put it under a section such as: protocol imap {}. You've mentioned that you have different mail_plugins settings in different _files_, but are you sure they are always inside the protocl xxx {} section?Thank you for this detail. While I suspected such operation, I now know for sure. While not all protocol sections are defined in each file, here are the contents of the other files that contain mail_plugins parameters : 10-mail.conf: mail_plugins = $mail_plugins zlib quota 20-imap.conf: mail_plugins = $mail_plugins imap_zlib imap_quota antispam And here are the contents of each defined protocol section : 15-lda.conf: protocol lda { 15-lda.conf: mail_plugins = $mail_plugins sieve 15-lda.conf: } 20-lmtp.conf: protocol lmtp { 20-lmtp.conf: mail_plugins = $mail_plugins sieve 20-lmtp.conf: } Given that doveconf -n shows : protocol lmtp { mail_plugins = " zlib quota imap_zlib imap_quota antispam sieve" } I need to change something, somewhere. I am not opposed to removing $mail_plugins from any protocol section. Is it syntactically correct to use $mail_plugins in the 10-mail.conf file? Perhaps this is my source of the issues for lmtp? Here are the results of my tests when making changes : test 1 ) - removed $mail_plugins 10-mail.conf: mail_plugins = zlib quota - doveconf - n output shows : mail_plugins = zlib quota imap_zlib imap_quota antispam protocol lmtp { mail_plugins = zlib quota imap_zlib imap_quota antispam sieve } test 2 ) - removed mail_plugins from 10-mail.conf - doveconf - n output shows : mail_plugins = " imap_zlib imap_quota antispam" protocol lmtp { mail_plugins = " imap_zlib imap_quota antispam sieve" } test 3 ) - removed mail_plugins from 10-mail.conf - removed $mail_plugins from 15-lda.conf, 20-imap.conf, and 20-lmtp.conf - explicitly set mail_plugins in 15-lda.conf, 20-imap.conf, and 20-lmtp.conf - doveconf - n output shows : mail_plugins = zlib quota imap_zlib imap_quota antispam protocol lmtp { mail_plugins = zlib quota sieve } I?m curious as to why on the 2nd test, there are quote marks in the mail_plugins parameters but not in the 1st or 3rd test? I think the 3rd test is the desired operating configuration. If so, why is using $mail_plugins causing an issue? Is this a bug in the ubuntu 14.04 packages? Or was I wrong to use $mail_plugins in the lmtp protocol section (if so, the same is likely true for the lda protocol section)? --