Failed to get quota resource STORAGE/MESSAGE
Thomas Barth
tbarth at txbweb.de
So Mai 19 13:54:51 CEST 2024
Hello,
I would like to activate quota, but I get the following error. Any idea
why it can't be found and why the mapped dbfields "bytes" and "messages"
remain empty (0)?
doveadm quota get -u user at domain.de
doveadm(user at domain.de): Error: Failed to get quota resource STORAGE:
quota-dict: dict_lookup(priv/quota/storage) failed: Connection closed
(reply took 0.000 secs (0.001 in dict wait, 0.000 in other ioloops,
0.000 in locks))
doveadm(user at domain.de): Error: Failed to get quota resource MESSAGE:
quota-dict: dict_lookup(priv/quota/messages) failed: Connection closed
(reply took 0.000 secs (0.001 in dict wait, 0.000 in other ioloops,
0.000 in locks))
Quota name Type Value Limit
%
User quota STORAGE error error
error
User quota MESSAGE error error
##############
priv/quota/storage is defined in the file:
/etc/dovecot/dovecot-sql.conf.ext
map {
pattern = priv/quota/storage
table = mailusers
username_field = account
value_field = bytes
}
map {
pattern = priv/quota/messages
table = mailusers
username_field = account
value_field = messages
}
##############
Now with Debug-Parameter
doveadm -D quota get -u user at domain.de 2>&1 | awk -FDebug: '{print $2}'
A few skipping messages skipped
Skipping module ..., because dlopen() failed: ... (this is usually
intentional, so just ignore this message)
[...]
auth-master: userdb lookup(users at domain.de): Started userdb lookup
auth-master: conn unix:/run/dovecot/auth-userdb: Connecting
auth-master: conn unix:/run/dovecot/auth-userdb (pid=33004,uid=0):
Client connected (fd=9)
auth-master: userdb lookup(users at domain.de): auth USER input:
users at domain.de home=/data/vmail/user_conf/domain.de/user uid=5001
gid=5001 mail=maildir:/data/vmail/domain.de/users/
quota_rule=*:bytes=10737418240
auth-master: userdb lookup(users at domain.de): Finished userdb lookup
(username=users at domain.de home=/data/vmail/user_conf/domain.de/user
uid=5001 gid=5001 mail=maildir:/data/vmail/domain.de/users/
quota_rule=*:bytes=10737418240)
Added userdb setting: mail=maildir:/data/vmail/domain.de/user/
Added userdb setting: plugin/quota_rule=*:bytes=10737418240
Effective uid=5001, gid=5001, home=/data/vmail/user_conf/domain.de/user
Quota root: name=User quota backend=dict args=:proxy::quota
Quota rule: root=User quota mailbox=* bytes=10737418240 messages=0
Quota rule: root=User quota mailbox=Trash bytes=+104857600 messages=0
Quota warning: bytes=10200547328 (95%) messages=0 reverse=no
command=quota-warning 95 user at domain.de
Quota warning: bytes=8589934592 (80%) messages=0 reverse=no
command=quota-warning 80 user at domain.de
Quota grace: root=User quota bytes=1073741824 (10%)
quota-dict: user=user at domain.de, uri=proxy::quota, noenforcing=0
dict(proxy): dict created (uri=proxy::quota, base_dir=/run/dovecot)
open(/proc/self/io) failed: Permission denied
Namespace inbox: type=private, prefix=, sep=., inbox=yes, hidden=no,
list=yes, subscriptions=yes location=maildir:/data/vmail/domain.de/user/
maildir++: root=/data/vmail/domain.de/user, index=, indexpvt=,
control=, inbox=/data/vmail/domain.de/user, alt=
quota: quota_over_flag check: quota_over_script unset - skipping
dict(proxy): Looking up 'priv/quota/storage'
dict(proxy): Looking up (async) 'priv/quota/storage'
dict(proxy): conn unix:/run/dovecot/dict: Connecting
dict(proxy): conn unix:/run/dovecot/dict (pid=33004,uid=0): Client
connected (fd=10)
dict(proxy): Lookup finished for 'priv/quota/storage': not found
dict(proxy): conn unix:/run/dovecot/dict (pid=33004,uid=0):
Disconnected: Connection closed (fd=10)
dict(proxy): Lookup finished for 'priv/quota/storage': not found
dict(proxy): Looking up 'priv/quota/messages'
dict(proxy): Looking up (async) 'priv/quota/messages'
dict(proxy): conn unix:/run/dovecot/dict (pid=33004,uid=0): Connecting
dict(proxy): conn unix:/run/dovecot/dict (pid=33004,uid=0): Client
connected (fd=10)
dict(proxy): Lookup finished for 'priv/quota/messages': not found
dict(proxy): conn unix:/run/dovecot/dict (pid=33004,uid=0):
Disconnected: Connection closed (fd=10)
dict(proxy): Lookup finished for 'priv/quota/messages': not found
User session is finished
dict(proxy): Waiting for dict to finish pending operations
dict(proxy): dict destroyed
auth-master: conn unix:/run/dovecot/auth-userdb (pid=33004,uid=0):
Disconnected: Connection closed (fd=9)
##############
recalc is setting 'priv/quota/storage' and 'priv/quota/messages', but
where? The mapped dbfields "bytes" and "messages" remain empty (0)!
doveadm -D quota recalc -u user at domain 2>&1 | awk -FDebug: '{print $2}'
last lines of output
dict(proxy): Waiting for dict to finish pending operations
dict(proxy): Starting transaction
dict(proxy): Unsetting 'priv/quota/storage'
dict(proxy): conn unix:/run/dovecot/dict: Connecting
dict(proxy): conn unix:/run/dovecot/dict (pid=34968,uid=0): Client
connected (fd=20)
dict(proxy): Unsetting 'priv/quota/messages'
dict(proxy): Setting 'priv/quota/storage' to '608708975'
dict(proxy): Setting 'priv/quota/messages' to '30657'
quota-dict: Quota recalculated: count=30657 bytes=608708975
dict(proxy): Waiting for dict to finish pending operations
dict(proxy): Dict transaction finished
dict(proxy): conn unix:/run/dovecot/dict (pid=34968,uid=0):
Disconnected: Connection closed (fd=20)
User session is finished
dict(proxy): Waiting for dict to finish pending operations
dict(proxy): dict destroyed
auth-master: conn unix:/run/dovecot/auth-userdb (pid=34968,uid=0):
Disconnected: Connection closed (fd=9)
###############
I used the following nice documentation as a guide:
https://www.linuxbabe.com/mail-server/user-quota-postfixadmin-dovecot,
but it gives no further infomations to this error.
Mehr Informationen über die Mailingliste Dovecot