quota setup assistance (postfix+dovecot+mysql)
Hello list,
I have been struggling with establishing a working installation of dovecot with mySQL quota support. I have not been able to find a guide or tutorial that works for the current revisions of software I have at my disposal.
Most notably, the error I see in the mail log is as follows :
Mar 23 00:55:31 host dovecot: lmtp(328): Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so Mar 23 00:55:31 host dovecot: lmtp(328): Error: dlopen(/usr/lib/dovecot/modules/lib11_imap_quota_plugin.so) failed: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: undefined symbol: command_unregister Mar 23 00:55:31 host dovecot: lmtp(328): Fatal: Couldn't load required plugins
I have attached my dovecot -n output. The installed revision of dovecot is 2.2.9 on ubuntu 14.04.02 LTS.
Thank you in advance.
--
On 03/23/2015 04:34 AM, rooster wrote:
Hello list,
I have been struggling with establishing a working installation of dovecot with mySQL quota support. I have not been able to find a guide or tutorial that works for the current revisions of software I have at my disposal.
Most notably, the error I see in the mail log is as follows :
Mar 23 00:55:31 host dovecot: lmtp(328): Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so Mar 23 00:55:31 host dovecot: lmtp(328): Error: dlopen(/usr/lib/dovecot/modules/lib11_imap_quota_plugin.so) failed: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: undefined symbol: command_unregister Mar 23 00:55:31 host dovecot: lmtp(328): Fatal: Couldn't load required plugins
I have attached my dovecot -n output. The installed revision of dovecot is 2.2.9 on ubuntu 14.04.02 LTS.
Thank you in advance.
--
The imap_quota plugin is relevant only under protocol imap {}. It reports quota usage via the IMAP protocol. Under lmtp and any other protocol that can change quota usage, you need to load only the quota plugin, which does the actual work of accounting and enforcing the quota.
On 2015-03-23, at 1:43 AM, Gedalya gedalya@gedalya.net wrote:
The imap_quota plugin is relevant only under protocol imap {}. It reports quota usage via the IMAP protocol. Under lmtp and any other protocol that can change quota usage, you need to load only the quota plugin, which does the actual work of accounting and enforcing the quota.
Thank you for the hint. So what I need to do is remove $mail_plugins from each "mail_plugins =“ (I think the information I found was wrong in using $mail_plugins on each mail_plugins =, based on what you said above) , and only set the correct corresponding mail plugins? Is my example below, correct?
e.g. :
protocol imap {
mail_plugins = zlib quota imap_quota imap_zlib antispam
}
protocol lmtp {
mail_plugins = zlib quota
}
protocol lda {
mail_plugins =
}
--
On 2015-03-23, at 1:43 AM, Gedalya gedalya@gedalya.net wrote:
The imap_quota plugin is relevant only under protocol imap {}. It reports quota usage via the IMAP protocol. Under lmtp and any other protocol that can change quota usage, you need to load only the quota plugin, which does the actual work of accounting and enforcing the quota.
Thank you for the hint. So what I need to do is remove $mail_plugins from each "mail_plugins =“ (I think the information I found was wrong in using $mail_plugins on each mail_plugins =, based on what you said above) That idea is to set the global mail_plugins to contain the plugins you would want enabled in *all* places. If there is not a single such
On 03/23/2015 06:24 PM, rooster wrote: plugin, then indeed you can set the global mail_plugins to empty, but then you should still use $mail_plugins everywhere because then it would just work, should you ever add a plugin to the global list.
, and only set the correct corresponding mail plugins? Is my example below, correct?
e.g. :
protocol imap { mail_plugins = zlib quota imap_quota imap_zlib antispam }
protocol lmtp { mail_plugins = zlib quota }
protocol lda { mail_plugins = I don't see why you shouldn't add quota here, and zlib too in your case. If you don't use lda at all, it still won't hurt.
}
--
Finally, doveadm is sort of a "protocol" too and any protocol for which you did not specify its own "mail_plugins = ..." will use the global value itself. So for example here you explicitly turned off all plugins for lda, overriding the global value. And doveadm will use the global value. So just take it all into consideration.
On 2015-03-23, at 3:38 PM, Gedalya gedalya@gedalya.net wrote:
That idea is to set the global mail_plugins to contain the plugins you would want enabled in *all* places. If there is not a single such plugin, then indeed you can set the global mail_plugins to empty, but then you should still use $mail_plugins everywhere because then it would just work, should you ever add a plugin to the global list.
That makes sense. :)
<snip>
protocol lda { mail_plugins = I don't see why you shouldn't add quota here, and zlib too in your case. If you don't use lda at all, it still won't hurt.
I’m certain it is set. I will confirm my current configuration in each file and post the results.
Finally, doveadm is sort of a "protocol" too and any protocol for which you did not specify its own "mail_plugins = ..." will use the global value itself. So for example here you explicitly turned off all plugins for lda, overriding the global value. And doveadm will use the global value. So just take it all into consideration.
Thank you for the tidbit. That is good to know.
Here are the currently set parameters for mail_plugins in each config file :
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
If the above are the correct settings, why do I get the following errors?
Mar 23 00:55:31 host dovecot: lmtp(328): Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so Mar 23 00:55:31 host dovecot: lmtp(328): Error: dlopen(/usr/lib/dovecot/modules/lib11_imap_quota_plugin.so) failed: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: undefined symbol: command_unregister Mar 23 00:55:31 host dovecot: lmtp(328): Fatal: Couldn't load required plugins
--
On 03/24/2015 12:50 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
If the above are the correct settings, why do I get the following errors?
Mar 23 00:55:31 host dovecot: lmtp(328): Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so Mar 23 00:55:31 host dovecot: lmtp(328): Error: dlopen(/usr/lib/dovecot/modules/lib11_imap_quota_plugin.so) failed: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: undefined symbol: command_unregister Mar 23 00:55:31 host dovecot: lmtp(328): Fatal: Couldn't load required plugins
Doesn't make much sense. If that's the current config (and you restarted dovecot) then that shouldn't be happening. A good way to understand dovecot's config as it actually got applied is to run 'doveconf -n', try to review the output, and post here after masking out private info if you need further help.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
rooster wrote:
Most notably, the error I see in the mail log is as follows :
Mar 23 00:55:31 host dovecot: lmtp(328): Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so Mar 23 00:55:31 host dovecot: lmtp(328): Error: dlopen(/usr/lib/dovecot/modules/lib11_imap_quota_plugin.so) failed: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: undefined symbol: command_unregister
it's a linker problem. Are you sure, /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so exists at all, is readable, is from the very same Dovecot version?
Steffen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin)
iQEVAwUBVREjg3z1H7kL/d9rAQJ8xQgAw5eeh/Fqx5dDzjf+CHTAVV8NFHRG9pC3 DUIXW11YhJTMk7xEyyCDo0O3BLZHNv4UL1ekrKe4OwOyd2qiNkXnuGfX5kOhEscx wUBVgeIMj5/TUfY1B3k4+h8nCQD9fsMDV+D5cbrLjOZWrQJfJQl0VBXJ0/GXpefX BfAnWZ3HBoBbXJ64po5YVUhickEdXb9k2Li7XqUzeYOzdWUbXx/ZQMJC2BX855iV x3KDRKCBHinRJysA761xXJo0vbOmmgEBJrdE3PWXCODu2k+B+SxCEwboaqhB5Ak6 CV3DGVDJ6h5wLca6Ce2EOEI00iOOHfBYP3OLTIgvAp7MuoeLu223cw== =W8lh -----END PGP SIGNATURE-----
On 2015-03-24, at 1:42 AM, Steffen skdovecot@smail.inf.fh-brs.de wrote:
it's a linker problem. Are you sure, /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so exists at all, is readable, is from the very same Dovecot version?
Steffen
It might be a operating permissions issue then. The file(s) exist but the permissions are root:root on /usr/lib/dovecot and everything below.
Does this mean I need to change the auth workers "user = " parameter? Some are set to mail and some to the virtual mail user (vmail).
Here are the dovecot packages I have installed :
ii dovecot-antispam 2.0+20130822-2build1
ii dovecot-core 1:2.2.9-1ubuntu2.1
ii dovecot-imapd 1:2.2.9-1ubuntu2.1
ii dovecot-lmtpd 1:2.2.9-1ubuntu2.1
ii dovecot-managesieved 1:2.2.9-1ubuntu2.1
ii dovecot-mysql 1:2.2.9-1ubuntu2.1
ii dovecot-pop3d 1:2.2.9-1ubuntu2.1
ii dovecot-sieve 1:2.2.9-1ubuntu2.1
--
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
rooster wrote:
On 2015-03-24, at 1:42 AM, Steffen skdovecot@smail.inf.fh-brs.de wrote:
it's a linker problem. Are you sure, /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so exists at all, is readable, is from the very same Dovecot version?
It might be a operating permissions issue then. The file(s) exist but the permissions are root:root on /usr/lib/dovecot and everything below.
What are the permissions of the requested file itself? You say who owns the directory entries, but do not mention the permissions, please run:
ls -alR /usr/lib/dovecot/modules/
Does this mean I need to change the auth workers "user = " parameter? Some are set to mail and some to the virtual mail user (vmail).
No.
Steffen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin)
iQEVAwUBVREvVnz1H7kL/d9rAQK6lAgAh5K8YAf+jPmfCpmmTv2etx7rpIN1yvOC NcLwbl4G1BqL7t9PMkCw64Nk6f3dOaqm6XhE4a1ow4eVR0NxzU5f24yRWAiro4bd M70ezo8fRrESy+fennRsw1++NXj6YfeWv/Pab+vpLuaxDAyGng9ST+UeOJQ1y84f Rko0Osg1+7bAJPu3L1FaK+uwBh6+8W4YZKfaas6BVq/QCcehFqyMnSmvZLWMjF2b eby9npwXQlx4zNC9Hya5Wo6uX5CiNSv6hj6O5iUwD4Lox+a7W2Veemb1SQwvoCMF cz8ap4QDcwqzgw0UnjU7I1j0bqVQBXcbaYSBcxZ9voPPtd5B/shUnA== =RjrD -----END PGP SIGNATURE-----
On 2015-03-24, at 2:33 AM, Steffen skdovecot@smail.inf.fh-brs.de wrote:
What are the permissions of the requested file itself? You say who owns the directory entries, but do not mention the permissions, please run:
ls -alR /usr/lib/dovecot/modules/
all directories are drwx r-x r-x
all files are -rw -r- - r- -
all links are lrwx rwx rwx
Does this mean I need to change the auth workers "user = " parameter? Some are set to mail and some to the virtual mail user (vmail).
No.
Okay.
--
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 24 Mar 2015, rooster wrote:
On 2015-03-24, at 2:33 AM, Steffen skdovecot@smail.inf.fh-brs.de wrote:
What are the permissions of the requested file itself? You say who owns the directory entries, but do not mention the permissions, please run:
ls -alR /usr/lib/dovecot/modules/
all directories are drwx r-x r-x all files are -rw -r- - r- - all links are lrwx rwx rwx
:-) OK, this reply doesn't necessarily answers my question, please run & post output of:
file /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so ldd /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so ls -al /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBVRFhqnz1H7kL/d9rAQKIqggAlYlwSQjX07bKpb11IPgsM3xl9/Xpx8Lf 2etmiJeBei8y1vyG5xwwVe4gtBTzCowIp5U8UwFVYo/Gv0RoLFXaLXGebfnAIkxD RZMzVqGBNK7qDb0K76OrKiaaLiX8xFAniQDu3ZZof9XadMCvBckvDkLcG+MdW7Tz l9xNQKvBkyeNMWW7Gn1TbRVLEE6URi7gjYheFFWM5cWAS6aMNPCa1+OE86ZNp3f8 xBKys7xpjHpoCNbc84OvwB0cjsbFJkY7eR9BLCtC3+tisEdVCDkYpwCxaqA8vH3m 2UsltJ8WmQ00NIwIXUhJ+mm9XBLQGXRkibI5R4I1OGeU+XtttlapKg== =eurE -----END PGP SIGNATURE-----
On 2015-03-24, at 6:07 AM, Steffen Kaiser skdovecot@smail.inf.fh-brs.de wrote:
all directories are drwx r-x r-x all files are -rw -r- - r- - all links are lrwx rwx rwx
:-) OK, this reply doesn't necessarily answers my question, please run & post output of:
file /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so ldd /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so ls -al /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so
I did what I thought you requested but I see now, not so. :)
Here is the output as requested (thank you for the continued assistance).
user@host: # file /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, BuildID[sha1]=f7e458d8845c6f4131d16cb69c30c22446f60550, stripped
user@host: # ldd /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so linux-vdso32.so.1 => (0x00100000) lib10_quota_plugin.so => /usr/lib/dovecot/modules/lib10_quota_plugin.so (0x6ffaa000) libc.so.6 => /lib/powerpc-linux-gnu/libc.so.6 (0x6fe0b000) /lib/ld.so.1 (0x206e6000)
user@host: # ls -al /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so -rw-r--r-- 1 root root 9512 May 14 2014 /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so
--
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 24 Mar 2015, rooster wrote:
On 2015-03-24, at 6:07 AM, Steffen Kaiser skdovecot@smail.inf.fh-brs.de wrote:
all directories are drwx r-x r-x all files are -rw -r- - r- - all links are lrwx rwx rwx
:-) OK, this reply doesn't necessarily answers my question, please run & post output of:
file /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so ldd /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so ls -al /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so
I did what I thought you requested but I see now, not so. :)
Here is the output as requested (thank you for the continued assistance).
user@host: # file /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, BuildID[sha1]=f7e458d8845c6f4131d16cb69c30c22446f60550, stripped
user@host: # ldd /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so linux-vdso32.so.1 => (0x00100000) lib10_quota_plugin.so => /usr/lib/dovecot/modules/lib10_quota_plugin.so (0x6ffaa000) libc.so.6 => /lib/powerpc-linux-gnu/libc.so.6 (0x6fe0b000) /lib/ld.so.1 (0x206e6000)
user@host: # ls -al /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so -rw-r--r-- 1 root root 9512 May 14 2014 /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so
it's a pity, I hoped there is a symlink problem.
Could you please try the three commands with this file:
/usr/lib/dovecot/modules/lib10_quota_plugin.so
as well?
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBVRKqOXz1H7kL/d9rAQJmeAf/SnxAj/OCXd2/Ud5LfwNJhwli1Mv+iGAM PmqMPhZgvw8W9NbDotz8CPuZvj7P/Mm1Bbk6sL+5WFRSAt+WJtdPzjyaxkFBhuTN YqD2knOUgjPH1UTrKR0jyA/OJCwvg72tmVe8uFQ0KEIGY9AXkQzf0bJSnW3+E/yh lD4NT6CaoGUwNNQusNyVjEdKaqZ60BCVBA8/HF66hLRaRb96trnJp9JihmbRt9DB Trg2gzm2bokAD9foi1ba8UuHSQbzdUxqAuDDU/WQrRDYdV4hHmrz3hX/c/M8NPfI o10FDhjgfnWn3+zHz5x9DIUhTPIbbRZ+NqgHM8TTLyVXhycuc7V+rw== =2SmU -----END PGP SIGNATURE-----
On 2015-03-25, at 5:29 AM, Steffen Kaiser skdovecot@smail.inf.fh-brs.de wrote:
it's a pity, I hoped there is a symlink problem.
Could you please try the three commands with this file:
/usr/lib/dovecot/modules/lib10_quota_plugin.so
as well?
- -- Steffen Kaiser
I too wish it were something simple and it very well maybe and it’s just the errors are not pointing us in the right direction. :)
Here is the output as requested.
user@host: # file /usr/lib/dovecot/modules/lib10_quota_plugin.so /usr/lib/dovecot/modules/lib10_quota_plugin.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, BuildID[sha1]=75eee844003c3da4dfeeafc470095db07bf121ea, stripped
user@host: # ldd /usr/lib/dovecot/modules/lib10_quota_plugin.so linux-vdso32.so.1 => (0x00100000) libc.so.6 => /lib/powerpc-linux-gnu/libc.so.6 (0x6fe2e000) /lib/ld.so.1 (0x2056c000)
user@host: # ls -la /usr/lib/dovecot/modules/lib10_quota_plugin.so -rw-r--r-- 1 root root 75552 May 14 2014 /usr/lib/dovecot/modules/lib10_quota_plugin.so
--
On 2015-03-23, at 1:34 AM, rooster yawowb+dovecot@nuclei.ca wrote:
Hello list,
I have been struggling with establishing a working installation of dovecot with mySQL quota support. I have not been able to find a guide or tutorial that works for the current revisions of software I have at my disposal.
Most notably, the error I see in the mail log is as follows :
Mar 23 00:55:31 host dovecot: lmtp(328): Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so Mar 23 00:55:31 host dovecot: lmtp(328): Error: dlopen(/usr/lib/dovecot/modules/lib11_imap_quota_plugin.so) failed: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: undefined symbol: command_unregister Mar 23 00:55:31 host dovecot: lmtp(328): Fatal: Couldn't load required plugins
I have attached my dovecot -n output. The installed revision of dovecot is 2.2.9 on ubuntu 14.04.02 LTS.
Thank you in advance.
--
It should be noted, that if I remove quota and imap_quota from mail_plugins , the error message goes away. Of course though, this is not the desired configuration (no quota support).
--
On 2015-03-23, at 1:34 AM, rooster yawowb+dovecot@nuclei.ca wrote:
Hello list,
I have been struggling with establishing a working installation of dovecot with mySQL quota support. I have not been able to find a guide or tutorial that works for the current revisions of software I have at my disposal.
Most notably, the error I see in the mail log is as follows :
Mar 23 00:55:31 host dovecot: lmtp(328): Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so Mar 23 00:55:31 host dovecot: lmtp(328): Error: dlopen(/usr/lib/dovecot/modules/lib11_imap_quota_plugin.so) failed: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: undefined symbol: command_unregister Mar 23 00:55:31 host dovecot: lmtp(328): Fatal: Couldn't load required plugins
I have attached my dovecot -n output. The installed revision of dovecot is 2.2.9 on ubuntu 14.04.02 LTS.
Thank you in advance.
--
Since I hadn’t tested access to dovecot yet, I ran through the test steps posted on the wiki (http://wiki.dovecot.org/TestInstallation). I was able to log in and list the mailboxes successfully, but the error above still persists on message delivery.
Should I be using lmtp with postfix + mysql and dovecot? Or should I be using lda? The directions I read were for lmtp.
--
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
rooster wrote:
On 2015-03-23, at 1:34 AM, rooster yawowb+dovecot@nuclei.ca wrote:
Hello list,
I have been struggling with establishing a working installation of dovecot with mySQL quota support. I have not been able to find a guide or tutorial that works for the current revisions of software I have at my disposal.
Most notably, the error I see in the mail log is as follows :
Mar 23 00:55:31 host dovecot: lmtp(328): Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so Mar 23 00:55:31 host dovecot: lmtp(328): Error: dlopen(/usr/lib/dovecot/modules/lib11_imap_quota_plugin.so) failed: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: undefined symbol: command_unregister Mar 23 00:55:31 host dovecot: lmtp(328): Fatal: Couldn't load required plugins
I have attached my dovecot -n output. The installed revision of dovecot is 2.2.9 on ubuntu 14.04.02 LTS.
Thank you in advance.
--
Since I hadn?t tested access to dovecot yet, I ran through the test steps posted on the wiki (http://wiki.dovecot.org/TestInstallation). I was able to log in and list the mailboxes successfully, but the error above still persists on message delivery.
Should I be using lmtp with postfix + mysql and dovecot? Or should I be using lda? The directions I read were for lmtp.
The actual question is, why your system cannot load the shared libray lib11_imap_quota_plugin.so dynamically, although lib10_quota_plugin.so works.
Maybe you should remove the failed file and force a reinstall of the package. I don't suppose, the package is defective, someone other should have reported this problem by now.
Steffen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin)
iQEVAwUBVRgwEHz1H7kL/d9rAQKJZgf9GDoJL2sZ4Aik7Df5Ld290tG4LeHeAfcB Wo5GmCsYQJwDbCUKflzYYsGk37/MwVEh0xP7gdbclgT+VTVv7f6n/VgnM/V1w+R7 cLtv56LD6fyfHOylLhykDUiWsQiH41gLb+SUdy7LV11oGPM8BgpY1pQreXmUq2QR CY8nDrVIEZ774VG7TyJBacLQ2/bsavW0s0eLxkLKVykptDH8ZVtas1GsRqlWlEC6 HdzFE5eb2TfilorwMH+l2DjiRwNsaBzO1BkeGnnCnTMz2OK1KOZxkfOWtgTSUQw+ G15V88MEe5PaxDJez/Yj8qtnJsv8QLD+ekRjc407rU3zzM6a/67zlA== =xxG5 -----END PGP SIGNATURE-----
On 03/29/2015 01:02 PM, Steffen wrote:
The actual question is, why your system cannot load the shared libray lib11_imap_quota_plugin.so dynamically, although lib10_quota_plugin.so works.
Maybe you should remove the failed file and force a reinstall of the package. I don't suppose, the package is defective, someone other should have reported this problem by now.
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@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.
On 2015-03-29, at 10:16 AM, Gedalya gedalya@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@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@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)?
--
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? When you use $mail_plugins for the first time, it is equal to the empty string, because it wasn't set yet. When you set a config setting to $mail_plugins followed by a space, and
On 03/30/2015 07:11 PM, rooster wrote: then some more stuff, you are effectively putting a leading space into the value. doveconf -n represents this clearly by quoting the string. This is not important.
I think the 3rd test is the desired operating configuration. No. You are putting imap - specific plugins in the global mail_plugins. If so, why is using $mail_plugins causing an issue? Is this a bug in the ubuntu 14.04 packages? No. Or was I wrong to use $mail_plugins in the lmtp protocol section No.
You need to revise your general understanding of how dovecot configuration works. I suggest you read slowly and carefully my previous messages in this thread, as I have already explained a few facts that are relevant to your trouble, plus whatever other sources, such as the dovecot wiki.
participants (4)
-
Gedalya
-
rooster
-
Steffen
-
Steffen Kaiser