Routing emails flow from O365 to on premise SMTP (MTA)

Copper Contributor

Hello, My MX will be set in my o365 tenant soon and my goal for now is to send internet email from o365 to on premise UNIX SMTP (MTA) that are my fences in the DMZ for my Exchange servers. I know that I have to setup a connector in O365 to receive the emails, but which IP's should I allow in my Firewall for O365?

Some tells me only to use IP's  for EOP with Port 25 open :  

 

And some ask me to open all IP's from Office 365 URLs and IP address ranges

 

So, which to choose for now I only need to redirect internet email flow from O365 to SMTP (MTA) in which in return send the email to my CAS Exchange servers.

Many thanks 

 

2 Replies

Hi @MSJ62,

 

You only need to open in your firewall to your MTA the EOP's IP's in port 25.

For Routing emails flow from O365 to on premise SMTP all you need is your MTA the EOP's IP's in port 25 however you need to have open all IP's from Office 365 URLs and IP address ranges in case if you need to further integration with any other O365 apps like Teams etc., its good practice as Microsoft is continuously improving the Office 365 service and adding new functionality, which means the required ports, URLs, and IP addresses may change over time.

Hope this helps!