我的 Dovecot 安装不会覆盖 userdb 中的配额限制。我已经验证它确实成功连接到我的 Mysql 数据库,但我的配额限制仍然保持在默认的 100MB。我做错了什么吗?
Dovecot.conf
====================================================
mail_plugins = $mail_plugins quota
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
}
userdb {
driver = prefetch
}
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
protocol imap {
mail_plugins = $mail_plugins imap_quota
}
protocol lmtp {
mail_plugins = quota fts sieve
}
protocol lda {
mail_plugins = quota
}
plugin {
quota = maildir
quota_rule = *:storage=100M
quota_rule2 = Trash:storage=+10%%
}
service auth-worker {
user = vmail
}
service dict {
unix_listener dict {
mode = 0660
user = vmail
group = vmail
}
}
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
mail_debug =yes
dovecot-sql.conf.ext
====================================================
driver = mysql
connect = host=127.0.0.1 dbname=****SNAP**** user=****SNAP**** password=****SNAP****
default_pass_scheme = SHA256-CRYPT
password_query = SELECT email as user, password FROM virtual_users WHERE email='%u';
default_pass_scheme = SHA256-CRYPT
user_query = SELECT CONCAT('*:bytes=', quota) as quota_rule FROM virtual_users WHERE email = '%u'
答案1
尝试将配额插件移到 userdb 配置之前。大多数配置都是自上而下处理的,最后一个值优先。