How to Relay Mail Through Exchange Server 2010 – SMTP Relay

How To Relay Mail through Exchange Server 2010 – SMTP Relay

CHUONG K. NGUYEN – BSc., MCSEx2, MCSAx2, MCP, MCTS, MCITP, CCNA

From a Windows 10 host inside the LAN, we attempt to relay email through the Exchange Server using Windows PowerShell command:

Send-MailMessage –To chuong@dalaris.local –From frank@dalaris.local –Subject Test –Body Test –SmtpServer 10.0.0.11

Out of the box, this should fail because the Exchange Server prevents us from relaying messages for security reasons.

The way we resolve this issue is to create a new Receive Connector.

Name: My Relay Connector.

Type: Custom.

Local Network Settings: Remove the (All Available IPv4) and add the private IP address of the Exchange Server, which is 10.0.0.11. Set the port as 25.

Leave the FQDN field empty.

 

Remote Network Settings: Remove the default subnet. Add the IP address (or subnet) of the remote computer that is allowed to relay.

After done creating the Receive Connector, right-click on it and choose Properties. Click Permission Group tab and select Anonymous.

Now resend the email using the command:

Send-MailMessage –To chuong@dalaris.local –From frank@dalaris.local –Subject Test –Body Test –SmtpServer 10.0.0.11

The message should be sent successfully.

Now we will try to relay and send the message to an Internet User.

Send-MailMessage –To chuong@yahoo.com –From frank@dalaris.local –Subject Test –Body Test –SmtpServer 10.0.0.11

The relay will fail. This is the desired settings because we do not want to relay message to the Internet.

Go back to the properties of the Receive connector. Click Permission Groups tab. Checkmark on “Exchange Servers.” On the Authentication tab, choose Externally Secured (For example IPSec).

Now to message can be relayed successfully.