After doing some configrations i got errors with quota and my setup is brocken now: dict: dict { quotadict = mysql:/etc/dovecot/conf.d/sql/dovecot-dict-sql.conf # expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf }
dovecot-dict-sql.conf: connect = host=localhost dbname=postfix user=postfix password=postfixadmin 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 }
quota plugin config: plugin { quota = dict:User quota::proxy::quotadict quota_rule = *:storage=1G quota_rule2 = Trash:storage=+100M }
user_query field: user_query = SELECT concat('/home/vmail/', maildir) as home, concat('maildir:/home/vmail/', maildir) as mail, 1001 AS uid, 12 AS gid, concat('dict:storage=',floor(quota/1000),' proxy::quotadict') AS quota FROM mailbox WHERE username = '%u' AND active = '1'
Errors log: dovecot.log: Jun 24 11:41:24 imap: Debug: Loading modules from directory: /usr/lib/dovecot Jun 24 11:41:24 imap: Debug: Module loaded: /usr/lib/dovecot/lib10_quota_plugin.so Jun 24 11:41:24 imap: Debug: Module loaded: /usr/lib/dovecot/lib11_imap_quota_plugin.so Jun 24 11:41:24 imap: Debug: Module loaded: /usr/lib/dovecot/lib20_autocreate_plugin.so Jun 24 11:41:24 imap: Debug: Added userdb setting: mail=maildir:/home/vmail/office.dev/test/ Jun 24 11:41:24 imap: Debug: Added userdb setting: plugin/quota=dict:storage=10240 proxy::quotadict Jun 24 11:41:24 imap(test@office.dev): Debug: Effective uid=1001, gid=12, home=/home/vmail/office.dev/test/ Jun 24 11:41:24 imap(test@office.dev): Debug: Quota root: name=storage=10240 proxy backend=dict args=:quotadict Jun 24 11:41:24 imap(test@office.dev): Debug: Quota rule: root=storage=10240 proxy mailbox=* bytes=1073741824 messages=0 Jun 24 11:41:24 imap(test@office.dev): Debug: Quota rule: root=storage=10240 proxy mailbox=Trash bytes=+104857600 messages=0 Jun 24 11:41:24 imap(test@office.dev): Debug: dict quota: user=test@office.dev, uri=quotadict, noenforcing=0 Jun 24 11:41:24 imap(test@office.dev): Error: Dictionary URI is missing ':': quotadict Jun 24 11:41:24 imap(test@office.dev): Error: user test@office.dev: Initialization failed: Failed to initialize quota: Quota root storage=10240 proxy: init() failed Jun 24 11:41:24 imap(test@office.dev): Error: Invalid user settings. Refer to server log for more information. Jun 24 11:41:24 imap-login: Info: Login: user=test@office.dev, method=PLAIN, rip=192.168.0.11, lip=192.168.0.31, mpid=4611, TLS Jun 24 11:41:24 imap-login: Warning: SSL alert: where=0x4008, ret=256: warning close notify [192.168.0.11]
# doveadm quota recalc doveadm(root): Error: chdir(/root/) failed: Permission denied (euid=1001(vmail) egid=12(mail) missing +x perm: /root, euid is not dir owner) doveadm(root): Error: chdir(/root) failed: Permission denied doveadm(root): Error: net_connect_unix(/var/run/dovecot//dict) failed: Permission denied (euid=1001(vmail) egid=12(mail) missing +r perm: /var/run/dovecot//dict, euid is not dir owner)
why this command working in my home /root dir ? i have done next thing after: service dict { unix_listener dict { mode = 0660 user = vmail group = mail } } now i'm getting only next: ~]# doveadm quota recalc doveadm(root): Error: chdir(/root/) failed: Permission denied (euid=1001(vmail) egid=12(mail) missing +x perm: /root, euid is not dir owner) doveadm(root): Error: chdir(/root) failed: Permission denied
Whats wrong. Please help.