How to make users for second maildomain


(Nico Berg) #1

NethServer Version: 7.4
Module: mail

Hi there, I have a small question. I have my server up and running with a domain name Now I added a second domain name to the server for website and mail. I don’t want those users be a part of my server on but only mail users on
How to seperate those users? I only seem to be able to make users as

Thanks in advance, Pitmaster

(Saito Benkei) #2

AFAIK You can’t…

You can use alias to associate a mail with domain to a user/gorup with domain

Email Adresses -> tab “Mail Aliases” -> click on “Create New”

(Nico Berg) #3

But that means people have to log in with to get mail for
Thats unusual.


(Saito Benkei) #4

Yes, but you can log in without suffix.

(Rob Bosch) #5

@Pitmaster, what you want is a multi-tenant mail environment. Unfortunately NethServer does not provide that.
Webtop5 has the option to act as multi-tenant mail solution, but that feature is not implemented in NethServer.
@gabriele_bulfon has explained it in this post
For the rest I refer to what @saitobenkei said: you can create domain users with the domain you configured when you installed your Samba4 domain or LDAP domain.
You can add several other mail domains so your domain users can send and receive with alias email addresses. Those aliases can be either created from the initial domain or with another mail domain.

(Saito Benkei) #6

I made a installation like yours, where I need to have two or more separate domains for mail address.

I don’t need to join to SMB or LDAP domains or to use it as file server so I use a dirty hack:

Suppose that mail domains are and

I installed my machine with local LDAP provider. The Domain I’ve assigned is @local.lan (yes, @local.lan)

For every user I create a name.surname@local.lan profile/login

Example: I have:

Mario Rossi (his email is
Piero Bianchi (his email is
Elisa Neri (her email is
Franca Rossi (her email is

I’ve created the following users:


In “Email” -> “Domains” I’ve created domain emails
That point to “this server”

In “Email addresses” -> Tab “Mail Aliases” I’ve assigned the correct email address to every user -> mario.rossi@local.lan -> piero.bianchi@local.lan -> elisa.neri@local.lan -> franca.rossi@local.lan

In this way you don’t risk that someone who writes at the (email that don’t have to exist), the mail is delivered.

You can login to POP3/IMAP/SMTP/Webtop/Roundcube either with name.surname or name.surname@local.lan (if you use activesync with webtop you must use name.surname@local.lan).

In this way you have user logins that aren’t bound directly to your email addresses.

Remember to put the host names of your domains in “DNS” -> “Server Alias”

If in your provider DNS you have registered and that points to pubic IP address of your server, you have to insert and in “DNS” -> “Server alias”.

Remember to create the correct entry of those hosts in your local DNS too.


If you want to use the webtop cloud to send/receive attachments, you should have a third “generic” domain/host (for example where download/upload links have to point.

Configure in Nethserver as above for others domains, then digit the next commands in console:

config setprop webtop PublicUrl ""
signal-event nethserver-webtop5-update

(http is correct, Nethserver will be redirect to https automatically)

How is NS actually used as a multi-domain mail server?
(Nico Berg) #7

I am testing a vm with ClearOS at the moment. See or this OS can do the job.


(Saito Benkei) #8

Maybe they have same situation as Nethserver:

(Nico Berg) #9

Hmmmm, it look like it is pretty much the same. Damn, maybe back to my old Ubuntu.
I think about a vm with Nethserver within the default server…


(Riens van Hertum) #10

If you want to use Nextcloud in Webtop then I recommend to use https instead of http. The link you send for downloading will be in http and when a password is necessary to download the file it will be probably in plain text.

(Saito Benkei) #11

Webtop switches automatically from http to https when you click on the link.

Nethesis Technical Assistance has told me specifically:

in prop uses http and not https, then the system will perform the redirect appropriately.
(Occhio: nella prop usa http e non https, sarà poi il sistema ad effettuare opportunamente il redirect.)

Sorry, probably I have misunderstood.

The modify that I wrote it’s for use inside Webtop cloud
I never tried with link directly to another cloud system without going through Webtop cloud

(Riens van Hertum) #12

I have tested it from within Nextcloud and there the link was sent in https:. When I integrated Nextcloud into Webtop (cloud) the link was sent in http. I had to change the Webtop ‘Public Url’ to get it right.