Email questions - users with multiple domains

NethServer Version: 7.4
Module: Email

Further questions regarding migrating from SME server…

With SME, you can have any number of domains, but all users have email addresses on all domains. So, if you have a user called fred, and you have domain1, domain2, and domain3, that user will receive email at fred@domain1, fred@domain2, and fred@domain3.

My SME server has a few domains configured, and about 15 user accounts. The accounts work as described above, though a few of the accounts are “intended” for domains other than the primary domain.

First Question: Does Neth work the same way as SME in this regard? Or are user/email accounts tied to a specific domain?

I tested migration from my SME server earlier (using the rsync-migrate script), and noticed that all the users imported as user@primarydomain. I guess that makes some sense (since accounts on SME aren’t specific to any domain), but as noted above, some of the accounts really are supposed to belong to a different domain. There doesn’t seem to be any way to edit those once imported.

Second Question: Is it possible to assign those imported users to the preferred domain?

This is all about the difference between userdomain (samba4/OpenLDAP) and maildomain.

1 Like

No doubt it’s my ignorance showing, but I’m afraid that answer didn’t help me understand further. I’m not running this box in an AD environment (and curse M$ for adopting the term “domain” for that, and thereby confusing millions); I’m using local LDAP for authentication.

I’ve done a little more testing, and it appears that no matter what domains I have configured on the system, any users are going to be created in the primary domain–when I add a user, “@primarydomain.tld” appears after the username field, and can’t be edited. This suggests to me that the answer to my “first question” above is that Neth works like SME in this regard, and if that’s the case, the second question is all but moot. But to be more specific:

  • Given a system that’s configured with domain1.tld and domain2.tld, with user account user1@domain1.tld, will email to user1@domain2.tld be delivered to the same account?
  • In the above scenario, can user1 log in to services with either email address? The services I specifically have in mind are the mail servers (IMAP and SMTP), Nextcloud, and webmail. Can the user log in as user1, user1@domain1.tld, and/or user1@domain2.tld?

Further testing shows that the answer to this question is no. The user can log in as user1 or user1@domain1.tld, but not user1@domain2.tld.

A quick test suggests the answer to this one is no as well, but the test wasn’t comprehensive–it consisted of logging into Roundcube on the test machine as user1@domain1.tld, and trying to send a message to user1@domain2.tld. I’m still trying to think of a way to test this from outside (unless someone can answer this question, or point me to documentation that does).

Is there documentation that addresses these issues? Because the manual at doesn’t seem to in the least.

I got to setup a new mail domain on my VPS. To map an email address to a user (or other destination) you need an email alias. This should answer your first question: The user is only user@defaultdomain.tld but he can get mail from different mail addresses (user@somedomain.tld) that are mapped via the mail aliases. I can also send an email from user@domain1.tld to user@domain2.tld and see the mail I sent myself if I mapped the address by an alias. user@ALL MAILDOMAINS is possible too. I also tested from outside.

So it should also be possible to assign imported users a domain to get mail from via an alias.

The system enables the creation of an unlimited number of additional email addresses, from the Email addresses Mail aliases page. Each mail alias is associated with one or more destinations. A destination can be of the following types:

  • user mailbox,
  • shared mailbox,
  • external email address.


Thanks–hadn’t thought of using aliases this way. Can confirm that, after adding an alias of user1@domain2.tld to user1@domain1.tld, email to domain2 delivers properly. The user still can’t log in as user1@domain2.tld, but it’s easy enough to just log in as the username (rather than the full email address).

That will do what I need–as long as everyone can log in with just the username (which appears to be the case), that will work. And I’ll need to set the aliases manually, but there are few enough users that that won’t really be a problem.

1 Like

I’m trying to do exactly what you have achieved, but I’m failing. I posted here Mail alias failure with my probelm. How do you have things set up so it works for you?