[Dovecot] problems with quota and clients
Marco Sacchetto
marco.sacchetto at pradac.it
Wed Nov 28 16:18:58 EET 2012
Hi, I had configured dovecot in a pretty standard way and had it working
nicely enough with maildir quotas (no tests done apart for reaching the
quota and looking at mails coming back). Still I wanted to have the
quota and the actual quota usage displayed in postfixadmin (3.5) but I
think I messed with something. Now I can connect to the mailbox, send
mail, receive mail, see the quota usage in postfixadmin but:
* thunderbird: can create a subfolder if i do so by hand from the
client. But if I try sending a mail i get a [TRYCREATE] mailbox error as
it seems that thunderbird can't create the Sent box anymore by its own;
* thunderbird: when i delete mail, it goes in the trash folder. I try
then to delete it from there. In thunderbird indeed I see no mail
anymore but the quota level remain the same. Then I try to browser the
mail directory and... yep, all the messages are still there! How come?
This is the output of dovecot -n and the relevant sql configuration :
# 2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-33-generic i686 Ubuntu 12.04.1 LTS ext4
auth_mechanisms = plain login
auth_realms = yyyyyyyyy.it aaaaaaa.com xxxxx.it
auth_verbose_passwords = plain
debug_log_path = syslog
dict {
quotadict = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
first_valid_uid = 150
info_log_path = /var/log/syslog
last_valid_uid = 150
listen = *
mail_debug = yes
mail_gid = mail
mail_location = maildir:/var/vmail/%d/%u
mail_plugins = " quota"
mail_uid = vmail
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
mail_log_events = delete undelete expunge copy mailbox_delete
mailbox_rename
mail_log_fields = uid box msgid size
quota = dict:User quota::proxy::sqlquota
quota_rule = *:storage=50M
quota_rule2 = Trash:storage=+10M
}
postmaster_address = xxxxxxxx at yyyyyyyyy.it
protocols = " imap pop3"
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-userdb {
group = mail
mode = 0600
user = vmail
}
}
service dict {
unix_listener dict {
group = mail
mode = 0660
user = vmail
}
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
protocol lda {
mail_plugins = quota
}
protocol imap {
mail_plugins = quota imap_quota
}
protocol pop3 {
mail_plugins = quota
}
>>grep -v '^ *\(#.*\)\?$' dovecot-dict-sql.conf.ext
connect = host=127.0.0.1 dbname=mail user=mail password=xxxxxxx
map {
pattern = priv/quota/storage
table = quota2
username_field = username
value_field = bytes
}
map {
pattern = priv/quota/messages
table = quota2
username_field = username
value_field = messages
}
>>grep -v '^ *\(#.*\)\?$' dovecot-sql.conf.ext
driver = mysql
connect = host=localhost dbname=mail user=mail password=xxxxxxx
default_pass_scheme = MD5-CRYPT
password_query = \
SELECT username as user, password, '/var/vmail/%d/%u' as userdb_home, \
'maildir:/var/vmail/%d/%u' as userdb_mail, 150 as userdb_uid, 8 as
userdb_gid \
FROM mailbox WHERE username = '%u' AND active = '1'
user_query = \
SELECT '/var/vmail/%d/%u' as home, 'maildir:/var/vmail/%d/%u' as mail, \
150 AS uid, 8 AS gid, CONCAT('*:storage=',ROUND(mailbox.quota /
1024)) AS quota_rule \
FROM mailbox WHERE username = '%u' AND active = '1'
iterate_query = SELECT username AS user FROM mailbox
--
--
Questo messaggio è di carattere riservato ed è indirizzato esclusivamente al destinatario specificato. L'accesso, la divulgazione, la copia o la diffusione sono vietate a chiunque altro ai sensi delle normative vigenti, e possono costituire una violazione penale. Nel caso abbiate ricevuto questo messaggio per errore siete tenuti a cancellarlo immediatamente confermando al mittente, a mezzo e-mail, l'avvenuta cancellazione. (Legge Italiana 196/2003).
More information about the dovecot
mailing list