25/TCP or 2525/TCP?
Have you ever wondered how incoming and outgoing SMTP messages flow through your Exchange environment on their way to the destination mailboxes? In this article we utilize Wireshark packet capturing tool to see what ports are used on both Edge and the Mailbox servers to pass the messages through the pipeline. In our next article we'll dissect the transport pipeline with all the services involved in the process.
Our setup - Edge server and three Mailbox servers
In a simple environment only one single Mailbox server is used. There's not much to that scenario, both incoming and outgoing messages are passed to and from the internet through port 25/tcp SMTP port. However, things get interesting when multiple servers are involved. In our setup we have an EDGE server in the perimeter network, behind that four AD sites, each with an individual Exchange server, as shown in the following diagram
The site links costs in our system are as follows:
PS C:\> Get-AdSiteLink | Select Name, ADCost, ExchangeCost Name ADCost ExchangeCost ---- ------ ------------ NY-California 100 25 NY-Texas 100 50 California-Miami 100 25 Texas-Miami 100 50
1. Incoming email from the Internet to MB4
Let's follow the route of our email from info@opentechtips.com all the way from the start to the destination John.Doe@alwayshotcafe.com mailbox, that is living on MB4 server.
Mxtoolbox.com has a great header parser tool that displays the hops in an easily readable format.
a. As expected, the message arrives in the Edge server, on SMTP port 25/tcp.
The Edge server has a subscription to the NY AD site, with the MB1 mailbox server residing there. The Edge server also submits the message to port 25/tcp on the next hop (MB1) server.
b. From there, our message travels to MB4 through hub site MB2. Intra- and inter-site SMTP submission happens on port 2525/tcp.
c. MB2 to MB4 also uses the Default HUB transport receive connector that listens on 2525/tcp.
2. Outgoing email from MB4 to the Internet
Outgoing messages travel the exact same way in our setup, using the same route and same ports. Starting from MB4 mailbox server, the message is forwarded to MB2 on port 2525/tcp, then arrives on port port 2525/tcp on MB1, where the Default MB1 receive connector is listening to incoming intra-domain traffic. Then MB1 sends the message forwards the Edge server which sends it out to the next hop the MX record of the target domain specifies.
This article only focused on the receiving ports the messages were travelling through. For a more detailed guide on what happens exactly during message delivery and submission please check out the next article here.
Comments