Monday, May 24, 2010

Change SMTP port 25 in Exchange 2007

SkyHi @ Monday, May 24, 2010

For some reason you might want to change default SMTP port number 25 Exchange 2007 is using. Exchange 2007 uses RECEIVE AND SEND connectors, one for receiving mails and other for sending mails (obviously ;)

So you need to change ports on those connectors. I will not say those two, because you might be using more than two.

You change Receive connector port by opening the connector properties in Exchange Management Console --> Hub Transport --> RECEIVECONNECTORNAME --> Properties --> Network --> Local IP Addresses (Edit Receive Connector Binding)

Just to clarify what "Local IP Addresses" and "Remote Servers" are (from Exchange 2007 help), because I find it little bit confusing:
Use these local IP Addresses to receive mail
Use this list to specify the IP addresses and port numbers on which this Receive connector listens for incoming mail.
Receive mail from remote servers which have these IP addresses
Use this list to specify the remote IP address range from which this Receive connector accepts connections.

You change Send Connector port by using PowerShell. Open Exchange Management Shell and type:

Get-SendConnector -Identity "SENDCONNECTORNAME" | fl

Check the port number then type:

Set-SendConnector -Identity "SENDCONNECTORNAME" -port 26

In this example I set port 26 as SMTP port for sending messages. Check the change by typing

Get-SendConnector -Identity "SENDCONNECTORNAME" | fl

HUB and EDGE servers are responsible for mail transport, so include all the servers you need in your requirement.