Configure SMTP Relay with Exchange 2016 and NetScaler

image_pdfimage_print

After some years I’m refreshing my knowledge with Exchange.

The base setup of Exchange was done fast and the external access over NetScaler was easy with a script of a colleague.
But now, I wanted to serve an internal SMTP relay server of some internal services.

I found some good explanations on the site of Paul Cunningham (Link).

But unfortunately it doesn’t work within the Web GUI. The reason was like in other things a bug from Microsoft and the solution was found in Powershell. I found a manual by Jeff Guillet (Link).

The SMTP Relay was working if i configure the connections directly to the Exchange server but not through the NetScaler. And I wanted to solve this issue:

The reason for this misbehavior was clear. The receive connectors from Exchange server will be differented by the source IPs. In our base configuration from NetScaler all connection came from the same SNIP.

What was to do?

The Exchange server should think that the connections came from different sources. For this you can create an additional SNIP within NetScaler. One thing is important: you have to create a Net Profile for each SNIP and this Net Profile has to be bind to the correct vServer. If you don’t do that, the appliance uses for the connections both SNIP with Round Robin.

Step 1 – create an addition SNIP and Net Profiles:

add ns ip 192.168.100.12 255.255.255.0 -vServer DISABLED -gui DISABLED
add netProfile NP-192.168.100.11 -srcIP 192.168.100.11
add netProfile NP-192.168.100.12 -srcIP 192.168.100.12

Step 2 – create the LB vServer for the SMTP Relay:

add lb vserver lb-vsrv-mailrelay.domain.pit-SMTP TCP 192.168.100.90 25 -persistenceType NONE
bind lb vserver lb-vsrv-mailrelay.domain.pit-SMTP svc-smtp-pitex01

Step 3 – bind the Net Profiles to the LB vServer:

set lb vserver lb-vsrv-mail.domain.pit-SMTP -netprofile NP-192.168.100.11
set lb vserver lb-vsrv-mailrelay.domain.pit-SMTP -netprofile NP-192.168.100.12

Step 4 – configure the receive connector for SMTP with the new SNIP:

And now, have fun to rebuild this :-)

Sources: The EXPTA {blog}exchangeserverpro.com

Script: NS-ExSMTPRelay