Forum Discussion

Moataz_shaaban1245's avatar
Moataz_shaaban1245
Copper Contributor
Mar 21, 2021
Solved

Using custom port instead of smtp 25 for hybrid

Hello,

      I want to block port 25 completely in on-prem Exchange server ,so can I use port 587 for smtp communication between on-prem and Exchange online ?

  • Port 587 is meant for client-server communication, server to server email communication (especially cross-forest/Exch-O365) will mandatorily need port 25.
    Ref: https://docs.microsoft.com/en-us/Exchange/hybrid-deployment-prerequisites#hybrid-deployment-protocols-ports-and-endpoints

    What you can do however is to block the port 25 traffic on your gateway firewall to/fro O365 EOP IP range.

1 Reply

  • boneyfrancis's avatar
    boneyfrancis
    Iron Contributor
    Port 587 is meant for client-server communication, server to server email communication (especially cross-forest/Exch-O365) will mandatorily need port 25.
    Ref: https://docs.microsoft.com/en-us/Exchange/hybrid-deployment-prerequisites#hybrid-deployment-protocols-ports-and-endpoints

    What you can do however is to block the port 25 traffic on your gateway firewall to/fro O365 EOP IP range.

Resources