[Dovecot] Quota override problem
Hi all,
i am using debian etch with backports for dovecot (1.0.10) with Postfix (Version: 2.3.8-2+b1)
At the moment the quota for all maildir mailboxes is 265MB, some should be 512MB an others 10 MB for example.
See my Mysql:
mysql> show fields from users from mail; +----------+-------------+------+-----+----------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+-------------+------+-----+----------+-------+ | email | varchar(80) | NO | PRI | | | | password | varchar(20) | NO | | | | | quota | int(15) | NO | | 10485760 | | | active | tinyint(1) | NO | | 1 | | +----------+-------------+------+-----+----------+-------+
http://wiki.dovecot.org/Quota -> I looked here but i dont see my failure, merde.
My configuration is:
dovecot.conf: base_dir = /var/run/dovecot/ protocols = imaps log_timestamp = �^�^�%Y-%m-%d %H:%M:%S �^�^ syslog_facility = mail ssl_cert_file = /etc/ssl/dovecot/server.pem ssl_key_file = /etc/ssl/dovecot/server.key #ssl_ca_file = /etc/ssl/mycompany/ca/mycompany.pem #ssl_verify_client_cert = yes ssl_parameters_regenerate = 168 verbose_ssl = no mail_location = maildir:/home/vmail/%d/%n mail_extra_groups = mail mail_debug = no first_valid_uid = 5000 last_valid_uid = 5000 maildir_copy_with_hardlinks = yes protocol imap { login_executable = /usr/lib/dovecot/imap-login mail_executable = /usr/lib/dovecot/imap imap_max_line_length = 65536 mail_plugins = quota imap_quota ssl_listen = *:993 } protocol lda { postmaster_address = postmaster@osthome.de sendmail_path = /usr/lib/sendmail auth_socket_path = /var/run/dovecot/auth-master mail_plugins = cmusieve quota #sieve = /home/vmail/%d/%n/.dovecot.sieve } auth_verbose = no auth_debug = no auth_debug_passwords = no auth default { mechanisms = plain passdb sql { args = /etc/dovecot/dovecot-sql.conf } userdb static { args = uid=5000 gid=5000 sieve=/home/vmail/%d/%n/.dovecot.sieve } userdb sql { args = /etc/dovecot/dovecot-sql.conf } user = nobody socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = vmail group = vmail } client { path = /var/spool/postfix/private/auth mode = 0660 user = postfix group = postfix } } # # If you want client certificates, use these lines # ssl_require_client_cert = yes # ssl_username_from_cert = yes } namespace private { separator = . prefix = INBOX. inbox = yes } plugin { #quota = maildir # 10 MB + 1000 messages quota limit quota = maildir:storage=265000:messages=50000:ignore=Trash }
My dovecot-sql.conf is: driver = mysql connect = host=localhost dbname=mail user=admin password=secret default_pass_scheme = CRYPT
password_query = SELECT password FROM users WHERE email = '%u' AND active ='1'
user_query = SELECT email, 5000 AS uid, 5000 AS gid, CONCAT('maildir:storage=', quota) AS quota, mail_plugins FROM users WHERE email = '%u' AND active = '1'
On Sat, 2008-03-01 at 10:26 +0100, Oliver wrote:
userdb static { args = uid=5000 gid=5000 sieve=/home/vmail/%d/%n/.dovecot.sieve } userdb sql { args = /etc/dovecot/dovecot-sql.conf }
You use userdb static before userdb sql. This means that userdb sql is never actually used.
plugin { #quota = maildir # 10 MB + 1000 messages quota limit quota = maildir:storage=265000:messages=50000:ignore=Trash }
So all users use the default, 256MB as specified here.
user_query = SELECT email, 5000 AS uid, 5000 AS gid, CONCAT('maildir:storage=', quota) AS quota, mail_plugins FROM users WHERE email = '%u' AND active = '1'
This is never called.
So the fix would be to remove userdb static from dovecot.conf.
Hi Timo,
userdb static { args = uid=5000 gid=5000 sieve=/home/vmail/%d/%n/.dovecot.sieve } userdb sql { args = /etc/dovecot/dovecot-sql.conf }
You use userdb static before userdb sql. This means that userdb sql is never actually used.
this was correct, i didn' t saw this, thank you very much.
Oliver
Hi I see you have in quota :ignore=Trash, does it mean that the Trash folder would grow endless? is there a way of erasing mail in a folder (Trash) after a period of time? Thanks
On Sun, Mar 2, 2008 at 3:56 PM, Oliver debian@asmodeuz.myftp.biz wrote:
Hi Timo,
userdb static { args = uid=5000 gid=5000 sieve=/home/vmail/%d/%n/.dovecot.sieve } userdb sql { args = /etc/dovecot/dovecot-sql.conf }
You use userdb static before userdb sql. This means that userdb sql is never actually used.
this was correct, i didn' t saw this, thank you very much.
Oliver
Hi,
Hi I see you have in quota :ignore=Trash, does it mean that the Trash folder would grow endless? is there a way of erasing mail in a folder (Trash) after a period of time? Thanks
that's true, but with my small amount of users, this is no problem. You could build a cronjob deleting all 14 day old mails in Trash. (something with find and the -ctime option)
see http://wiki.dovecot.org/Quota/Maildir
With dovecot 1.1 you could do following:
http://wiki.dovecot.org/Quota/New
With these quota-rules it is possible to limit trash-size expecially for this folder.
Oliver
participants (3)
-
Oliver
-
Osvaldo Alvarez Pozo
-
Timo Sirainen