Add Userdb extra field to existing configuration settings, not overriding them

Stefano Cecconello stefano.cecconello at staff.aruba.it
Fri Jan 13 17:39:38 UTC 2023


Hi,

 

If i understood correctly the extra field feature (
https://doc.dovecot.org/configuration_manual/authentication/user_database_ex
tra_fields/ ), any extra field that is passed from a SQL query will
overwrite any existing settings on the dovecot.conf configuration file ( if
present ) . 

 

For example, if i want to enable a plugin ( ex: acl ) on a per user basis, i
would add a column\field ( ex: "acl_enabled" = 1 ) into my auth DB , then
add into the dovecot password\user queries :


.

IF(acl_enabled  = 0, NULL, 'acl imap_acl') AS mail_plugins

.

 

While having in the dovecot.conf this setting :

.

mail_plugins = quota notify 

 

protocol imap

mail_plugins = $mail_plugins imap_quota

 

.

 

>From my test, this combination will lead to having the logging users with
acl_enabled=1, a mail_plugins list of acl and imap_acl only, without the
quota and notify plugins .

If i change the acl_value to 0, the returned mail_plugins list is empty and
it will not overrive\overwrite the dovecot.conf mail_plugins configuration .

 

If it's correct, there is a way to merge both settings, like having in the
dovecot.conf a minimal\base subset of settings and adding any additional
values via SQL queries ?

 

Thanks and best regards

Stefano

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20230113/af903134/attachment.htm>


More information about the dovecot mailing list