[Dovecot] Quota is not working (Debian Squeeze - Dovecot 1.2)
RaSca
rasca at miamammausalinux.org
Mon Jan 16 12:42:08 EET 2012
Hi all,
I'm trying to make quota work in Squeeze (Dovecot 1.2.15-7).
The quota module is correctly loaded and, when receiving a message, from
the log I see these messages:
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): Loading
modules from directory: /usr/lib/dovecot/modules/lda
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): Module
loaded: /usr/lib/dovecot/modules/lda/lib10_quota_plugin.so
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): Module
loaded: /usr/lib/dovecot/modules/lda/lib90_sieve_plugin.so
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): auth
input: uid=5000
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): auth
input: gid=5000
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): auth
input: home=/mail/mailboxes/<mydomain>/testquota
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): Quota
root: name=/mail/mailboxes/<mydomain>/testquota backend=maildir args=
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): maildir:
data=/mail/mailboxes/<mydomain>/testquota@<mydomain>
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>):
maildir++: root=/mail/mailboxes/<mydomain>/testquota@<mydomain>, index=,
control=, inbox=/mail/mailboxes/<mydomain>/testquota@<mydomain>
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): sieve:
user's script path /mail/mailboxes/<mydomain>/testquota/.dovecot.sieve
doesn't exist (using global script path in stead)
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): sieve:
using sieve path for user's script: /mail/sieve/globalsieverc
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): sieve:
opening script /mail/sieve/globalsieverc
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): sieve:
executing compiled script /mail/sieve/globalsieverc
Jan 16 11:20:04 mail-1 dovecot: deliver(testquota@<mydomain>): Namespace
: Using permissions from
/mail/mailboxes/<mydomain>/testquota@<mydomain>: mode=0700 gid=-1
Jan 16 11:20:05 mail-1 dovecot: deliver(testquota@<mydomain>): sieve:
msgid=<4F13F996.4000501 at seat.it>: stored mail into mailbox 'INBOX'
Now, since I've got a message like this:
Quota root: name=/mail/mailboxes/<mydomain>/testquota@<mydomain>
backend=maildir args=
it seems that something is checked, but even if this directory is over
quota, nothing happens.
This is my dovecot conf:
protocols = imap pop3
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/mail/mailboxes/%d/%n@%d
mail_privileged_group = mail
mail_debug = yes
mail_nfs_storage = yes
mmap_disable=yes
fsync_disable=no
mail_nfs_index = yes
protocol imap {
mail_plugins = quota imap_quota
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
mail_plugins = quota
}
protocol managesieve {
}
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
postmaster_address = postmaster@<mydomain>
mail_plugins = sieve quota
quota_full_tempfail = no
log_path =
}
auth default {
mechanisms = plain
passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
userdb passwd {
}
userdb static {
args = uid=5000 gid=5000 home=/mail/mailboxes/%d/%n@%d
allow_all_users=yes
}
user = root
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = vmail
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
plugin {
quota = maildir:/mail/mailboxes/%d/%n@%d
sieve_global_path = /mail/sieve/globalsieverc
}
The db connection works, this is /etc/dovecot/dovecot-sql.conf:
driver = mysql
connect = host=<myserver> dbname=mail user=<myuser> password=<mypassword>
default_pass_scheme = CRYPT
password_query = SELECT username, password FROM mailbox WHERE username='%u'
user_query = SELECT username AS user, maildir AS home,
CONCAT('*:storage=', quota , 'B') AS quota_rule FROM mailbox WHERE
username = '%u' AND active = '1'
and for the user testquota the user_query results in this:
+-------------------+----------------------------+--------------------+
| user | home | quota_rule |
+-------------------+----------------------------+--------------------+
| testquota@<mydom> | <mydom>/testquota@<mydom>/ | *:storage=1024000B |
+-------------------+----------------------------+--------------------+
everything else is ok, for example I'm using sieve for the spam filter,
and the SPAM is correctly put in the .SPAM dir.
I turned on debug on dovecot, but I can't see if the query in some way
fails.
Can you please help me to understand what am I doing wrong?
--
RaSca
Mia Mamma Usa Linux: Niente è impossibile da capire, se lo spieghi bene!
rasca at miamammausalinux.org
http://www.miamammausalinux.org
More information about the dovecot
mailing list