Ubuntu

Dovecot 忽略 userdb

  • November 21, 2017

我的 Dovecot 安裝不會覆蓋 userdb 中的 quota_limit。我已經驗證它確實成功連接到我的 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'

嘗試在 userdb 配置之前移動配額外掛。大多數配置都是自上而下處理的,最後一個值獲勝。

引用自:https://serverfault.com/questions/884531