Backtrack:  
 
by lunarg on January 28th 2010, at 17:28

I've written an article before on how to change the outgoing SMTP port for SmartHost in Exchange 2003. Now, I have to do this again for Exchange 2007 as they've changed this procedure.

When you're unable to send e-mail directly to the internet (using MX), you probably have to set up a SmartHost to relay the e-mail for you. This is basically your ISP's SMTP server, but can be another server as well.
In certain cases, the default SMTP port (port 25) cannot be used to connect to the SmartHost, so you have to change this to something else. Gmail for instance, uses port 587 for SMTP. Other 3rd party mail services use this (or another port) as well to circumvent spam protection initiated by a lot of ISPs - they block connections to any other SMTP server on port 25 but their own.
Lucky for us, it's possible to change the outgoing port. But, while in Exchange 2003, this was not easy to find but was still quite doable, they've made it rather challenging in Exchange 2007: changing this setting is no longer possible through GUI, but solely through the Exchange CLI.
Whether this is better or worse, is a discussion for another time and place. This article simply focuses on how to change the outgoing port through the CLI.

Notice
This applies to any server running Exchange 2007, be it a standalone Exchange, or the Exchange included in SBS 2008.
Note that on SBS 2008, changing the SmartHost using the SBS console will reset the SMTP port back to 25.

Solution

Start the Exchange Management Console.

The SmartHost is in fact a Send Connector. To change its properties, if there's more than one connector, its name is required. To get it, type in:

Get-SendConnector

You should get an output like so:

Next up, you can ask the properties of the specific connector with:

Get-SendConnector -Identity "connector name" | Format-List

One of the items will show the current port number. This is the one you'd want to change:

To change the port number, use the following syntax:

Set-SendConnector -Identity "connector name" -Port 587

Substitute the connector name with the one you have, and the port to the one you want. You can re-check the settings with the previous command to see whether the configuration change has been applied. If everything's alright, you can close the management console.

Normally, it's not required to restart Exchange.

This has been tested on a SBS 2008 w/ SP2.

 
 
« April 2024»
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930    
 
Links
 
Quote
« Have you tried turning it off and on again? »
The IT Crowd