dbmail icon indicating copy to clipboard operation
dbmail copied to clipboard

How to use usermap?

Open hemml opened this issue 3 years ago • 1 comments

I'm using ldap auth and users can login with their usernames (without @domain component), but I want also allow them to use "username@mydomain" logins, because some imap clients using this in auto-configuration.

I have added a record into dbmail_usermap:

 login | sock_allow | sock_deny |    userid
-------+------------+-----------+--------------
 ANY   |            |           | %s@mydomain

but after that users just cannot login with any login (username or username@mydomain). What is wrong?

hemml avatar Jun 26 '22 09:06 hemml

I have read the manual more carefully and found, what dbmail_usermap works differently, the records like:

login            | sock_allow | sock_deny |    userid
-----------------+------------+-----------+--------------
 user@mydomain   |            |           | user

works and I have added records for all my users as a workaround. But, it will be nice to have wildcards here. Or an option like login_ignore_domain_part=yes in the config.

hemml avatar Jun 26 '22 14:06 hemml