[Dovecot] Quota_rules ignored
Today I upgraded to version 1.1.16 of Dovecot (and Sieve), because I wanted to use mailbox quotas. I tried using the instructions on http://wiki.dovecot.org/Quota/1.1 and simular websites for 4 hours now, but it seems that all quota_rules are ignored. Also, whenever I use a '*' in my MySQL query I get the error: 'unknown quota backend'. With the following query the quota from the database is used (if value is not NULL), but the quota_rules are ignored once again:
user_query = SELECT maildir AS home, 5000 AS uid, 5000 AS gid, CONCAT('maildir:storage=', quota) AS quota FROM mailbox WHERE username = '%u'
Below is my configuration:
# 1.1.16: /etc/dovecot/dovecot.conf # OS: Linux 2.6.24-19-virtual i686 Ubuntu 8.04.1 nfs log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3 pop3s ssl_disable: yes disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login mail_privileged_group: mail mail_location: maildir:/data/vmail/%d/%n mail_debug: yes mmap_disable: yes dotlock_use_excl: no mbox_write_locks: fcntl mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 auth default: mechanisms: plain login debug: yes passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: passwd userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: static args: uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: vmail plugin: quota: maildir:User quota quota_rule: *:storage=1G quota_rule2: .Trash:storage=100M
Any thoughts on how to solve this problem? Thanks in advance!
On Thu, 2009-06-18 at 00:28 +0200, A. Gideonse wrote:
Today I upgraded to version 1.1.16 of Dovecot (and Sieve), because I wanted to use mailbox quotas. I tried using the instructions on http://wiki.dovecot.org/Quota/1.1 and simular websites for 4 hours now, but it seems that all quota_rules are ignored. Also, whenever I use a '*' in my MySQL query I get the error: 'unknown quota backend'.
Use "AS quota_rule", not "AS quota".
quota_rule2: .Trash:storage=100M
Trash, not .Trash.
Now I get the following error:
Unknown settings: User quota
Also changes to the quota in the database are ignored (dovecot seems to use the old values though)
Timo Sirainen wrote:
On Thu, 2009-06-18 at 00:28 +0200, A. Gideonse wrote:
Today I upgraded to version 1.1.16 of Dovecot (and Sieve), because I wanted to use mailbox quotas. I tried using the instructions on http://wiki.dovecot.org/Quota/1.1 and simular websites for 4 hours now, but it seems that all quota_rules are ignored. Also, whenever I use a '*' in my MySQL query I get the error: 'unknown quota backend'.
Use "AS quota_rule", not "AS quota".
quota_rule2: .Trash:storage=100M
Trash, not .Trash.
The error log shows the following error for every login attempt:
Jun 18 09:10:02 Imap1 dovecot: IMAP(agideonse@xirtcms.com): maildir quota: Unknown setting: User quota
Met vriendelijke groet,
Arno Gideonse Programmeur E: agideonse@planet.nl
XirtCMS.com
Deze E-mail en alle daarbij meegezonden bijlagen zijn uitsluitend bestemd voor de geadresseerde(n). Verstrekking aan en gebruik door anderen is niet toegestaan. XirtCMS sluit iedere aansprakelijkheid uit die voortvloeit uit electronische verzending.
This E-mail and any attachment sent with it are intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any person other than the addressee(s). XirtCMS rules out any and every liability resulting from any electronic transmission.
Timo Sirainen wrote:
On Jun 17, 2009, at 6:48 PM, A. Gideonse wrote:
Now I get the following error:
Unknown settings: User quota
There's no such error string in Dovecot. Do you maybe mean "Unknown parameter"?
Set auth_debug=yes and mail_debug=yes and show me what it logs when you log in.
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4165 (20090618) __________
The message was checked by ESET NOD32 Antivirus.
You said you're using Dovecot v1.1.16. That error message exists only
in Dovecot v1.0. So your upgrade didn't work.
On Jun 18, 2009, at 3:23 AM, A. Gideonse wrote:
The error log shows the following error for every login attempt:
Jun 18 09:10:02 Imap1 dovecot: IMAP(agideonse@xirtcms.com): maildir
quota: Unknown setting: User quotaMet vriendelijke groet,
Arno Gideonse Programmeur E: agideonse@planet.nl
XirtCMS.com
Deze E-mail en alle daarbij meegezonden bijlagen zijn uitsluitend bestemd voor de geadresseerde(n). Verstrekking aan en gebruik door anderen is niet toegestaan. XirtCMS sluit iedere aansprakelijkheid uit die voortvloeit uit electronische verzending.
This E-mail and any attachment sent with it are intended exclusively
for the addressee(s), and may not be passed on to, or made available for
use by any person other than the addressee(s). XirtCMS rules out any and every liability resulting from any electronic transmission.Timo Sirainen wrote:
Now I get the following error:
Unknown settings: User quota There's no such error string in Dovecot. Do you maybe mean "Unknown
On Jun 17, 2009, at 6:48 PM, A. Gideonse wrote: parameter"? Set auth_debug=yes and mail_debug=yes and show me what it logs when
you log in. __________ Information from ESET NOD32 Antivirus, version of virus
signature database 4165 (20090618) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
The old dovecot was installed using apt-get, so I tried installing the new version by downloading, compiling and installing (configure, make, make install), because I couldn't upgrade the package using apt-get. After reboot it now shows 1.1.16 for 'dovecot --version'. I can attempt to remove dovecot with apt-get and reinstall the compiled version again?
Timo Sirainen wrote:
You said you're using Dovecot v1.1.16. That error message exists only in Dovecot v1.0. So your upgrade didn't work.
On Jun 18, 2009, at 3:23 AM, A. Gideonse wrote:
The error log shows the following error for every login attempt:
Jun 18 09:10:02 Imap1 dovecot: IMAP(agideonse@xirtcms.com): maildir quota: Unknown setting: User quota
Met vriendelijke groet,
Arno Gideonse Programmeur E: agideonse@planet.nl
XirtCMS.com
Deze E-mail en alle daarbij meegezonden bijlagen zijn uitsluitend bestemd voor de geadresseerde(n). Verstrekking aan en gebruik door anderen is niet toegestaan. XirtCMS sluit iedere aansprakelijkheid uit die voortvloeit uit electronische verzending.
This E-mail and any attachment sent with it are intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any person other than the addressee(s). XirtCMS rules out any and every liability resulting from any electronic transmission.
Timo Sirainen wrote:
Now I get the following error:
Unknown settings: User quota There's no such error string in Dovecot. Do you maybe mean "Unknown
On Jun 17, 2009, at 6:48 PM, A. Gideonse wrote: parameter"? Set auth_debug=yes and mail_debug=yes and show me what it logs when you log in. __________ Information from ESET NOD32 Antivirus, version of virus signature database 4165 (20090618) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4165 (20090618) __________
The message was checked by ESET NOD32 Antivirus.
On 06/18/2009 09:41 AM A. Gideonse wrote:
The old dovecot was installed using apt-get, so I tried installing the new version by downloading, compiling and installing (configure, make, make install), because I couldn't upgrade the package using apt-get. After reboot it now shows 1.1.16 for 'dovecot --version'. I can attempt to remove dovecot with apt-get and reinstall the compiled version again?
What was the prefix? /usr/local?
Show: which dovecot
I believe the 'old' one is still running, started via the init script.
Regards, Pascal
The trapper recommends today: defaced.0916909@localdomain.org
It shows '/usr/local/sbin/dovecot'. How can I update the init scripts so it starts / exits the right dovecot at startup?
Pascal Volk wrote:
On 06/18/2009 09:41 AM A. Gideonse wrote:
The old dovecot was installed using apt-get, so I tried installing the new version by downloading, compiling and installing (configure, make, make install), because I couldn't upgrade the package using apt-get. After reboot it now shows 1.1.16 for 'dovecot --version'. I can attempt to remove dovecot with apt-get and reinstall the compiled version again?
What was the prefix? /usr/local? Show:
which dovecot
I believe the 'old' one is still running, started via the init script.
Regards, Pascal
It shows '/usr/local/sbin/dovecot'. How can I update the init scripts so it starts / exits the right dovecot at startup?
Pascal Volk wrote:
On 06/18/2009 09:41 AM A. Gideonse wrote:
The old dovecot was installed using apt-get, so I tried installing the new version by downloading, compiling and installing (configure, make, make install), because I couldn't upgrade the package using apt-get. After reboot it now shows 1.1.16 for 'dovecot --version'. I can attempt to remove dovecot with apt-get and reinstall the compiled version again?
What was the prefix? /usr/local? Show:
which dovecot
I believe the 'old' one is still running, started via the init script.
Regards, Pascal
Pascal Volk wrote:
On 06/18/2009 09:41 AM A. Gideonse wrote:
The old dovecot was installed using apt-get, so I tried installing the new version by downloading, compiling and installing (configure, make, make install), because I couldn't upgrade the package using apt-get. After reboot it now shows 1.1.16 for 'dovecot --version'. I can attempt to remove dovecot with apt-get and reinstall the compiled version again?
What was the prefix? /usr/local? Show:
which dovecot
I believe the 'old' one is still running, started via the init script.
Regards, Pascal
I just did some research on the server and you are completely right. When I look at the /etc/init.d/dovecot script I see that the daemon is loaded at /usr/sbin/dovecot. If I request the version in that directory I indeed get the old version number. Now my problem is that I seem to have to installations of dovecot now, with the older one running and the newer one being idle. Is there an easy way to solve this issue? I tried stopping the service, then changing the DAEMON variable in the /etc/init.d/dovecot file and starting it again, but that didn't work. Any suggestions?
Please note: the older version was installed using 'apt-get', the newer version was installed by compiling from source. As additional information: the server is currently using the JEOS distribution (thus Ubuntu).
NB. Thank to Charles, this message will hopefully be posted inline now ;).
On 06/19/2009 01:59 AM A. Gideonse wrote:
I just did some research on the server and you are completely right. When I look at the /etc/init.d/dovecot script I see that the daemon is loaded at /usr/sbin/dovecot. If I request the version in that directory I indeed get the old version number. Now my problem is that I seem to have to installations of dovecot now, with the older one running and the newer one being idle. Is there an easy way to solve this issue? I tried stopping the service, then changing the DAEMON variable in the /etc/init.d/dovecot file and starting it again, but that didn't work. Any suggestions?
Please note: the older version was installed using 'apt-get', the newer version was installed by compiling from source. As additional information: the server is currently using the JEOS distribution (thus Ubuntu).
NB. Thank to Charles, this message will hopefully be posted inline now ;).
Have a look at your source directory, e.g. /usr/local/src/dovecot-1.1.16 Inside the the the doc directory you will find a init script (dovecot-initd.sh). If the file is not there, have a look at: http://hg.dovecot.org/dovecot-1.2/file/5ee5def4f0ff/doc/dovecot-initd.sh Read the comments in the script. See also update-rc.d(8) for information how to 'activate' the script.
Regards Pascal
The trapper recommends today: deadbeef.0917002@localdomain.org
Pascal Volk wrote:
On 06/19/2009 01:59 AM A. Gideonse wrote:
I just did some research on the server and you are completely right. When I look at the /etc/init.d/dovecot script I see that the daemon is loaded at /usr/sbin/dovecot. If I request the version in that directory I indeed get the old version number. Now my problem is that I seem to have to installations of dovecot now, with the older one running and the newer one being idle. Is there an easy way to solve this issue? I tried stopping the service, then changing the DAEMON variable in the /etc/init.d/dovecot file and starting it again, but that didn't work. Any suggestions?
Please note: the older version was installed using 'apt-get', the newer version was installed by compiling from source. As additional information: the server is currently using the JEOS distribution (thus Ubuntu).
NB. Thank to Charles, this message will hopefully be posted inline now ;).
Have a look at your source directory, e.g. /usr/local/src/dovecot-1.1.16 Inside the the the doc directory you will find a init script (dovecot-initd.sh). If the file is not there, have a look at: http://hg.dovecot.org/dovecot-1.2/file/5ee5def4f0ff/doc/dovecot-initd.sh Read the comments in the script. See also update-rc.d(8) for information how to 'activate' the script.
Regards Pascal
I tried that, but failed (probably due to lack of knowledge). I now upgraded the linux distro and got the server back to work (with some errors though, but nothing that can't be fixed I think). Also, dovecot is updated to a 1.1.x version and it's overwriting the default storage limit correctly if available in the database. The only thing that doesn't work for dovecot is that it is ignoring the settings for the Trash / Spam folders. Any clue on what might be wrong? I changed the query / settings as suggested earlier (removed the dot / changed 'quota' into 'quota_rule'):
plugin: quota: maildir:User quota quota_rule: *:storage=1G quota_rule2: .Trash:storage=100M quota_rule3: .Spam:ignore
NB. The spam/trash folder are located in the following folders on the server:
INBOX.Trash .Trash (probably obsolete, but for now it still remains) .Spam
Regards,
Arno
On Sun, 2009-06-21 at 18:38 +0200, A. Gideonse wrote:
Trash / Spam folders. Any clue on what might be wrong? I changed the query / settings as suggested earlier (removed the dot / changed 'quota' into 'quota_rule'):
plugin: quota: maildir:User quota quota_rule: *:storage=1G quota_rule2: .Trash:storage=100M quota_rule3: .Spam:ignore
The above settings still have the dot. They should be either:
quota_rule2 = Trash:storage=100M quota_rule3 = Spam:ignore
or:
quota_rule2 = INBOX.Trash:storage=100M quota_rule3 = INBOX.Spam:ignore
What matters is how IMAP clients see the mailbox, not what it's called in filesystem.
Timo Sirainen wrote:
On Sun, 2009-06-21 at 18:38 +0200, A. Gideonse wrote:
Trash / Spam folders. Any clue on what might be wrong? I changed the query / settings as suggested earlier (removed the dot / changed 'quota' into 'quota_rule'):
plugin: quota: maildir:User quota quota_rule: *:storage=1G quota_rule2: .Trash:storage=100M quota_rule3: .Spam:ignore
The above settings still have the dot. They should be either:
quota_rule2 = Trash:storage=100M quota_rule3 = Spam:ignore
or:
quota_rule2 = INBOX.Trash:storage=100M quota_rule3 = INBOX.Spam:ignore
What matters is how IMAP clients see the mailbox, not what it's called in filesystem.
The dots were removed, but I accidentally copied the old settings to show what my settings were. Anyway, the information was useful since I know was able to correctly ignore some of the INBOX.* folders. The problems with the rules not being used by Dovecot were magically solved after two reboots of the server... Thanks to all for the help!
My next problems is that I want a vacation/'out of office'-message for some users this summer. Is this a default option or not? Or can I find this option in the Postfix settings (there is a field in the postfix/dovecot database for it) If not, I will probably have to start a new thread if I can't work out how it works (though I hope there is some nice info available through Google) ;) .
participants (3)
-
A. Gideonse
-
Pascal Volk
-
Timo Sirainen