Dmitry Streblechenko
Dmitry Streblechenko

Reputation: 66276

Exchange server: outgoing SMTP server name?

I am trying to find the name of the SMTP server responsible for delivering outgoing Exchange messages.

I can easily find the incoming SMTP server name though the MX record, but I need the SMTP server for the outgoing messages. Autodiscover does not help either - it has everything and a kitchen sink (EWS endpoint, etc.), but not the outgoing SMTP server name.

Is it in the Active Directory (for the on-prem Exchange servers)?

Thank you!

Upvotes: 0

Views: 3559

Answers (1)

Semicolon
Semicolon

Reputation: 136

Which version of Exchange are you running?

You can run the following from an Exchange Management Shell, it should provide you with sufficient information.

Get-SendConnector | Select-Object -Property Identity,Enabled,SmartHosts,AddressSpaces,SourceTransportServers

Or from the ECP/EAC, select mail flow, and then select Send Connectors. If you have more than one, you'll have to poke around and find the one that is enabled, for the address space '*' with the lowest cost - that will most likely be your default connector. Open/view the send connector. Select Scoping, on the bottom half of the popup window, you will see a "Source server" box. The server(s) in that box are those responsible for getting outbound email out of the Exchange organization.

However, there is a possibility that Exchange just sends to a smart host which scans, logs or otherwise handles your outbound mail before it actually leaves your network. There would be an entry under "SmartHosts" if that were the case in the powershell output or under "Delivery" in the EAC.

As a side note, there is no real de facto "outbound smtp" server like there is a de facto "inbound smtp server" (i.e the MX). I think about as close as you can get is to have a name, address, or block designated in your SPF record, but its not quite the same thing.

Edit - find information in Active Directory:

Get-ADObject -Filter 'objectClass -eq "msExchRoutingSMTPConnector" -SearchBase "CN=Configuration,DC=domain,dc=com"

Will give you a list of send connectors, the routingList Attribute will tell you what namespace each connector is valid for and what the cost is. Unfortunately, from these objects, I do not know how to obtain the server names included in those send connectors.

You could also find these via ADSIedit or another tool that would allow you to browse the configuration in AD. The rough path is:

CN=Connections,CN=ExchangeRouting Group (xxxxxx),CN=RoutingGroups,CN=Exchange Administrative Group (xxxxxx),CN=Administrative Groups,CN=ExchangeOrganization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=com".

Your mileage may vary.

Upvotes: 1

Related Questions