Domain alias and dovecot

I have a domain with both the .com and .org versions. On my original system some users logged in as user@domain.com, some as user@domain.org

Making a domain alias gives me mail for both in the same box, but as of now I can only authenticate as .com (.org is the alias).

Is there a way that I could authenticate as either?

SYSTEM INFORMATION
OS type and version Ubuntu 24.04
Virtualmin version 7.50

The only thing that comes to mind is in Webmin users and groups.
Clone the user and copy all original users settings User id Group ID home dir and the encrypted password.

image

Alot of work if you doing alot of users though

Thank you, this does work, and yes it’s a lot of manual work, but it worked this way before I migrated their mail server, so that’s that.

For posterity “Clone User” doesn’t mean quite what one might expect (it gets you the encrypted password and real name, but not much else). Also you get me with a “You really shouldn’t be doing this” message along the way. Also you will probably want to open two tabs of your Virtualmin server for this (see the aforementioned “Clone User” note) and open both to:

Webmin > System > Users and Groups > Local Groups

Locate and click the group that the user belongs to (hopefully “their-domain.com”) and click a user.

In one of your tabs click “Clone User” at the bottom, and now fill out (along with anything else you may have set which does not match):

Username - this will be your alternative domain version
Shell (match the real user)
UserID (third radio button, match the real user)
Home directory (second radio button, paste the path from the real user)
Primary group (click to select the same “Existing group”)
“No” on all three radio buttons at the bottom
Create

As stefan1959 asserted, this user can now use the mail. (Don’t forget to setup an SSL for the alias’s domain if you haven’t already).