On 28/07/2021 09:12, Miloslav Hůla wrote:
Now we would like to disable authentication for Postfix (SMTP), but
allow it for Dovecot (IMAP & POP3). Something like "receive-only".
Is there any way we can configure different passdb for mentioned
inet_listener?
Or is there any variable with "auth requetor name" we can use in SQL
query to differentiate the result?
%s for service
https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Something like:
password_query = "SELECT password, allow_nets, '*:storage=' || quota ||
'M' AS userdb_quota_rule FROM mailbox WHERE username = '%n' AND domain =
'%d' AND %Ls = true;"
Note the "AND %Ls = true". The 'L' is for lower case.
Add boolean columns for the services to your database.