Sometimes you will find the situation having several types of mailservers within one organization, for example Exchange in combination with another mailserver. But how can you arrange that Exchange will accept the mail, checks if the recipient exists on the Exchange server and if not will forward it to the other mailserver.
In this tutorial we will ensure that mail which is send to the domain myuclab.nl will be accepted by Exchange and if the user does not exist Exchange will forward it to the other mailserver with ip address 192.168.0.52
First we will need to make sure Exchange will accept the mail for the specific domain. This can be done via the Exchange Management Console or via the Exchange Management Shell. Start the EMC and select the HUB Transport server below organizational configuration and select the option new accepted domain. A wizard will start and will help you to create the new accepted domain.
Fill in a name and the accepted domain. You could choose to accept only mail which is send to myuclab.nl or also every subdomain. In this case you will need to put *. in front of the domain name or ensure a checkmark is placed in the box before include all subdomains.
Next option is to select the type of domain, in this case we choose the option internal relay domain. When all options are set correctly click on new and after that on finish to close the wizard.
When you choose the incorrect option, for example the default option authoritive domain, Exchange would generate a NDR when it can’t find a user which matches the e-mail address of the recipient. The second step is to create the send connector, with this Exchange knows what to do with mail when a user is not found on the Exchange server. Select the option new send connector again a wizard will be started.
Fill in a logical name, for example the domainname for which the send connector is created, and select internal as the type connector and then click next to continue.
In the next screen you will need to specify a name space, the domainname for which the send connector will be used.In this case myuclab.nl, all other options are keeping the default values. When the name space is added click on next to go to the next step.
In this step we will define the network settings. There are two options: deliver via dns of via a smarthost. In this case we choose the option smarthost and fill in the ip address of the other mailserver in the newly opened window. When it is added click on next to go to the next step.
In this screen we define the authentication method. For security reasons it may be necessary to specify a username and password of a certificate which is used for authentication. Select the correct authentication method, selecting the incorrect one can prevent mail from getting delivered.
One of the last steps is specifying the source server, in this case we only have one server so this is correct. If there are more HUB Transport servers or you are using the Edge Server ensure that all correct servers are added.
Click on next and then on new to create the send connector.
The configuration is finished, of course when the other mailserver is configured correctly, mail can be send from the internet to users on both the Exchange server and the other mailserver.
Ofcourse all steps can also be performed via the Exchange Management Shell, below two commands with the correct parameters which can be used:
New-AcceptedDomain -Name "myuclab.nl" -DomainName myuclab.nl -DomainType InternalRelay
New-SendConnector -Name "myuclab.nl" -Internal -AddressSpace myuclab.nl -DnsRoutingEnabled $false -SmartHosts 192.168.0.52 -SmartHostAuthMechanism ExternalAuthoritative -MaxMessageSize 20MB