NethServer and Exchange

Hi All,

I’m new to Nethserver coming from another distro. I have searched but I couldn’t find an exact howto…Maybe I had a man look…
In brief, I have this scenario for incoming/outgoing email:

BigBadWorld > Router > Linux > Exchange server

Email comes to the linux box, gets filtered and scanned for viruses and then forwarded onto the exchange server.

On the way out, exchange uses the Linux box as a SmartHost through a linux user and password,
and the process is reversed.

How do I forward email from Nethserver to exchange (I have the email modules installed on NethServer, and do I still use a linux user and password to send email from the exchange box?

Thank you in advance…


NethServer Version: your_version Latest
Module: your_module



And welcome to the NethServer community!

It can be even simpler…

For Outgoing:
You can set the smarthost to allow the trusted IPs of your LAN to send Mail without authentification…
I’d still suggest using a Linux User (eg: smtpuser) for your smarthost…

For Incoming:
You can forward all mail for a certain, defined domainname to another server.
You also have the option to forward mail “per user”.

My 2 cents


HI Andy and thanks for your kind and prompt reply…I’d keep things easy and forward the entire mail to exchange, but when I go and do that, the option is greyed out…
I hope I’m under the correct option…
Applications > Email > Domains > Edit and “relay to another server”
Option greyed out…

First create a new domain…

Hi there and thanks for the reply…OK…So I will have to place the NethServer onto his own domain and then forward to the existing exchange domain…
Right…So I take there is no way to rename the domain/hostname without re-installing…
Sorry about all the questions…Once I have got this right I will make a how to for anyone in this predicament…


You CAN change the domainname / IP of your NethServer if you haven’t installed an account provider yet.
If you remobve the account provider, you can change the domainname / ip, and then re-add the account provider…

My 2 cents

1 Like

:+1: Thanks…Sorry for being a pain…

1 Like


No probs!
I’m here to help!


Thanks guys…It is really appreciated…Will let you know tomorrow as I’m installing in client network…


Hi Andy…
Say the domain is
The new nethserver name is setup after install.
When I go to create “” domain in the email section, I can type in and forward to ip address say or, but when I click on save, nothing happens and the form stays there…


You can delete the default domain, as shown here. Then create a new domain as required…
This is domains in the e-mail “app”.

Hope this helps…


My 2 cents

Hi Andy,
I think the issue is that the nethserver is on the same domain, it won’t let me create the domain and forward email to the specified exchange server.

I can create the but it does not allow me to relay to another server…
If I create and then go back and try to click on the relay radio button, the option is greyed out…


Create a “fantasy” domain like mailrelay.domain.tld for the NethServer.
The fqdn would be nethserver.mailrelay.domain.tld
Then the original domain is free and untainted…

My 2 cents

Hey Andy, OK that works. However, just worried that when email arrives or gets sent via nethserver it will get rejected because of a dummy domain?

Good point, for outgoing, however:

There IS a howto on this forum how to set the smtp helo on Postfix… (NethServer uses Postfix).
This so other mailservers see the name as valid from the outside - whatever it may be…
Usually mail.domain.tld…



Not sure why I received this email from you… The how to you mention is exactly my message in the forum explaining how I did it.


Anyway, have a good day :slight_smile:

Unfortunately it does not work here.
I have one NS system A in a VPS with a fixed ip address installed and another NS B sits in the home network. A shall work as mailscanner: all mails shall be checked by A and then forwarded to B. In fact the mails are rejected: recipient unknown.
I have even connected B with the LDAP server in A. So B knows all users and mailboxes in A, but still the mails are not relayed.
Who can help here?

So should be the one the VPS, and should handle the email messages for, and be considered the mail exchanger and written in your DNS server.
And should receive messages after the mailwashing.

How is supposed to deliver messages to

By configuring domain in NS A as all mails to be delivered to B.
I used Xeams before and that was never a problem. But after three months I got hustle with the letsencrypt certificate.

This is how can receive all the messages for the domain. But how is supposed to deliver messages to

Also: which of the two servers is the one written into MX record? as I supposed or the other one?