SQL user_query quota_rule for *:messages=

Aki Tuomi aki.tuomi at open-xchange.com
Mon May 23 07:18:05 UTC 2022


> On 20/05/2022 16:41 James <list at 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_extra_fields/#authentication-user-database-extra-fields

If you are returning that from userdb, you should not return it with `userdb_` prefix.

Aki


More information about the dovecot mailing list