Hello,
dovecot.conf sets the system default quota for storage and message count:
plugin { ... quota_rule = *:storage=1G quota_rule2 = *:messages=10000 ... }
This quota_rule for the storage is overridden by an SQL user_query in dovecot-sql.conf:
user_query = "SELECT ... '*:storage=' || maxstorage || 'M' AS userdb_quota_rule, ...;"
Is it possible to override the message count limit with an SQL user_query (and password_query)?
I tried returning userdb_quota_rule2 in the SQL but it did not work. "SELECT ... '*:messages=' || maxcount AS userdb_quota_rule2 ...;"
Ref: https://doc.dovecot.org/configuration_manual/authentication/user_database_ex...
On 20/05/2022 16:41 James list@xdrv.uk wrote:
Hello,
dovecot.conf sets the system default quota for storage and message count:
plugin { ... quota_rule = *:storage=1G quota_rule2 = *:messages=10000 ... }
This quota_rule for the storage is overridden by an SQL user_query in dovecot-sql.conf:
user_query = "SELECT ... '*:storage=' || maxstorage || 'M' AS userdb_quota_rule, ...;"
Is it possible to override the message count limit with an SQL user_query (and password_query)?
I tried returning userdb_quota_rule2 in the SQL but it did not work. "SELECT ... '*:messages=' || maxcount AS userdb_quota_rule2 ...;"
Ref: https://doc.dovecot.org/configuration_manual/authentication/user_database_ex...
If you are returning that from userdb, you should not return it with userdb_
prefix.
Aki
On 23/05/2022 08:18, Aki Tuomi wrote:
Is it possible to override the message count limit with an SQL user_query (and password_query)?
I tried returning userdb_quota_rule2 in the SQL but it did not work. "SELECT ... '*:messages=' || maxcount AS userdb_quota_rule2 ...;"
Ref: https://doc.dovecot.org/configuration_manual/authentication/user_database_ex...
If you are returning that from userdb, you should not return it with
userdb_
prefix.
Thank you, correct advice, my mistake. I have a combined password_query and made the mistake of adding userdb_ prefix in both.
This has enabled the user limit for messages (as well as storage) and I can see over messages count causes defer like for over storage. Progress! Thank you for the help.
For reference the quota warning for messages is also working (from dovecot.conf): quota_warning6 = messages=90%% quota-warning 90 %u Testing this was my objective which required setting a very low per user value for a test account. Thank you.
participants (2)
-
Aki Tuomi
-
James