Dear Dovecot experts,
I am in the process of planning migration from dovecot 2.3 to
2.4.1+dfsg1-6 on Debian Trixie, but userdb extra fields for
quota_storage_size are ignored. All settings proved to work in 2.3;
following per-user quota manual as outlined in [1].
Issue
Cannot override setting quota_storage_size using
userdb_quota_storage_size, but userdb_quota_storage_extra and
userdb_quota_storage_percentage apparently work.
Setup
Configures multiple userdb using driver passwd combined for a) user
information and b) user-specific extra fields; auth. via passdb using
driver pam defined in auth-system.conf.ext included by 10-auth.conf
Excerpt from doveconf -n:
...
passdb system_pam {
driver = pam
}
userdb userdb_01_passwd {
driver = passwd
result_internalfail = return-fail
result_success = continue-ok
}
userdb userdb_02_quota {
passwd_file_path = /etc/dovecot/quota-user-settings
driver = passwd-file
result_internalfail = return-fail
result_success = continue
}
...
Excerpt from passwd file /etc/dovecot/quota-user-settings holding userdb
extra fields:
web1p1:::::::userdb_quota_storage_size=1200M
Default quota config excerpt from doveconf -n:
...
quota user {
storage_grace = 100M
storage_size = 750M
quota_warning warn-95 {
quota_storage_percentage = 95
execute quota-warning {
args = 95 %{user}
}
}
quota_warning warn-85 {
quota_storage_percentage = 85
execute quota-warning {
args = 85 %{user}
}
}
}
...
Result
Userdb setting appear to work correctly as it combines both userdb files,
see following output:
# doveadm user web1p1
field value
uid 644
gid 105
home /home/pop/web1p1
mail_path /home/pop/web1p1/mail
system_groups_user web1p1
quota_storage_size 1200M
However, querying the quota only shows the default value, but not the
user-specific setting.
# doveadm quota get -u web1p1
Quota name Type Value Limit
%
user STORAGE 798830 768000
104
user MESSAGE 5617 -
0
Expected behaviour
Any user should report default user quota (here 750M), but user web1p1
having user-specific setting for userdb_quota_storage_size=1200M should
report a higher quota limit overriding the default quota setting.
I tried to specify user-specific values for
userdb_quota_storage_extra and userdb_quota_storage_percentage, which
worked; probably, because there were no default value specified in the
config, yet?
Setting userdb_quota_storage_extra to 200M works:
web1p1:::::::userdb_quota_storage_extra=200M
...
# doveadm user web1p1
field value
uid 644
gid 105
home /home/pop/web1p1
mail_path /home/pop/web1p1/mail
system_groups_user web1p1
quota_storage_extra 200M
...
# doveadm quota get -u web1p1
Quota name Type Value Limit
%
user STORAGE 798830 972800
82
user MESSAGE 5617 -
0
Quota is reported as correctly as 750M+200M=950M.
Same approach works when setting userdb_quota_storage_percentage, e.g. to
a value above 100.
[1] [1]https://doc.dovecot.org/main/core/plugins/quota.html#per-user-quota
Many thanks for your support!
Matthieu
References
Visible links
1. https://doc.dovecot.org/main/core/plugins/quota.html#per-user-quota
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]