Different userdb per inet_listener

Miloslav Hůla miloslav.hula at gmail.com
Tue Aug 24 13:22:56 EEST 2021


Dne 28.07.2021 v 11:24 James napsal(a):
> 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.
>
Hi James,

I somehow missed your reply. That's exactly what I need.

Thank you!
Miloslav



More information about the dovecot mailing list