If you only have a single domain name, this should work. The method I am using allows a larger scope. You can loging as user1 or user1@domain1, etc.
If a user provides just "username" I run a query that tries to match it against domain1, domain, 2, domainM. Whichever matches first is used.
I guess it might be a good idea to force a bare username to have a made up domain, such as example.com, to avoid the case where tom matches a tom in another domain and guesses pass123 is their password.
I've tried to consider that situation in this example: https://github.com/rorycl/dovecot-config/tree/main/two-userdbs
In SQL I guess that might mean doing something like running a query like
domain IN (${user|domain}, 'example.com')
, and ensuring all domain-less users are given that default domain in the users table.
This looks like an interesting solution. I'm unsure how your two-userdbs code would make this work, though? Do you have specific instructions on how I might be able to do this?
Odhiambo, I'm also interested in your offer from above. Are you able to send me the code/ideas you referenced?
Thanks, Alex
Rory
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
> If you only have a single domain name, this should work. The method I
am
> using allows a larger scope. You can loging as user1 or user1@domain1,
etc.
>
> If a user provides just "username" I run a query that tries to match
it
> against domain1, domain, 2, domainM. Whichever matches first is used.
I guess it might be a good idea to force a bare username to have a made
up domain, such as [1]example.com, to avoid the case where tom matches a
tom in another domain and guesses pass123 is their password.
I've tried to consider that situation in this example:
[2]https://github.com/rorycl/dovecot-config/tree/main/two-userdbs
In SQL I guess that might mean doing something like running a query like
`domain IN (${user|domain}, '[3]example.com')`, and ensuring all
domain-less users are given that default domain in the users table.
This looks like an interesting solution. I'm unsure how your two-userdbs code would make this work, though? Do you have specific instructions on how I might be able to do this? Odhiambo, I'm also interested in your offer from above. Are you able to send me the code/ideas you referenced? Thanks, Alex
Rory
_______________________________________________
dovecot mailing list -- [4]dovecot@dovecot.org
To unsubscribe send an email to [5]dovecot-leave@dovecot.org
References
Visible links
- http://example.com/
- https://github.com/rorycl/dovecot-config/tree/main/two-userdbs
- http://example.com/
- mailto:dovecot@dovecot.org
- mailto:dovecot-leave@dovecot.org