When the script finishes, adjust the SMTP records on the mentioned IP addresses. Don’t forget to run the script on all the Exchange Servers that you have an SMTP relay receive connector configured on. Run the SMTP-Review.ps1 PowerShell script and let it run through the SMTP receive logs. Enable logging on the SMTP relay receive connector and copy the log path before you start.
#Exchange 2010 smtp relay how to
In this article, you learned how to find IP addresses using Exchange SMTP relay. Copy receive connector to another Exchange Server.Import remote IP addresses to Exchange receive connector.Export remote IP addresses to Exchange receive connector.Make a note of the IP addresses and adjust the SMTP field in the printers, applications, and servers to the new SMTP relay record. Also, it will generate an Output.txt file with the IP addresses in the same path where you have the script placed. The script will go through all the files, and after it finishes, you will see which IP addresses use the SMTP relay as output. For example, Exchange Server EX01-2016 and EX02-2016. Note: Run the script on all Exchange Servers if you have an SMTP relay configured on it. Run PowerShell as administrator and run the SMTP-Review.ps1 PowerShell script. In our example, this is how it looks: $LogFilePath = "C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\ProtocolLog\SmtpReceive\*.log" Run SMTP-Review PowerShell script In Line 80, change the path to the receive protocol log path that you searched for in the previous step. If you don’t have a scripts folder, create one. Place the script in C:\scripts folder on the Exchange Server. Read more: Exchange receive connector logging » Prepare SMTP-Review PowerShell scriptĭownload SMTP-Review.ps1 PowerShell script from here (direct) or here (GitHub). In the next step, we will prepare the PowerShell script to scan all the logs and filter out the IP addresses.
#Exchange 2010 smtp relay windows
ReceiveProtocolLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\ProtocolLog\SmtpReceiveĬopy ReceiveProtocolLogPath and paste it in Windows Explorer. ReceiveProtocolLogMaxFileSize : 10 MB (10,485,760 bytes) ReceiveProtocolLogMaxDirectorySize : 250 MB (262,144,000 bytes) C:\>Get-FrontendTransportService -Identity "EX01-2016" | fl Name,Identity,Receive* We can use Exchange Management Shell and find where the SMTP logs are placed. It’s not possible to find Exchange SMTP logs path in Exchange admin center. If you enabled SMTP relay receive connector logging right now, you have to wait a couple of days or weeks before logs are generated. Do the same on the other Exchange Servers. Enable SMTP relay logs C:\>Get-ReceiveConnector -Identity "EX01-2016\SMTP relay" | Set-ReceiveConnector -ProtocolLogging Verboseĭo you want to enable SMTP relay logging in Exchange admin center? Click in the details pane on the On link to enable SMTP logging. It’s most likely the transport role FrontendTransport.
If not, enable logging on the SMTP relay receive connector in the next step. If SMTP logging is enabled, skip the next step. Check that SMTP relay receive connector logging is enabled on all Exchange Servers. Note: If you have more than one Exchange Server in the organization, you most likely have an SMTP relay receive connectors configured on more than one Exchange Server for high availability. Select the SMTP relay receive connector and check in the details pane if it shows Logging – On. Select the Exchange Server that you want to check. You can check the SMTP logging status in Exchange admin center. Identity Enabled TransportRole ProtocolLoggingLevel BindingsĮX01-2016\Default EX01-2016 True HubTransport Verbose C:\>Get-ReceiveConnector -Server "EX01-2016" | ft Identity,Enabled,TransportRole,Protocol*,Bindings In our example, ProtocolLoggingLevel shows Verbose for the Identity SMTP Relay. Run Get-ReceiveConnector cmdlet and check if protocol logging is enabled on the SMTP relay receive connector. Run Exchange Management Shell as administrator. To be able to search for IP addresses in the logs, you need to enable logging on the connector.
Before we start, it’s good to know why we want to know which IP addresses use the Exchange SMTP relay.