Using PMG as internal mail relay for O365

lucian9982

New Member
Apr 23, 2024
5
2
3
Hello,

I am trying to use the PMG as internal mail relay for our O365(exchange online), i did the setup and it works.

My dilema is how do i filter emails authorization only to the hosts in place on the whitelist. It seems that by default it's relaying everything, so i would like to stop doing that, and allow only the IP sources or networks that i whitelist ( and more precisely, where needs to be whitelisted ? on the configuration - mail proxy - whitelist , or Mail Filter - who objects )
Reject unknown clients is set to Yes
So in short i want to allow only specific IP's to relay mails via PMG, how can i do that.

Thank you in advance for any help ( i have searched the forum, and i did not find something similar with my case )
 
  • Like
Reactions: anullinger
Hello,

I am trying to use the PMG as internal mail relay for our O365(exchange online), i did the setup and it works.

My dilema is how do i filter emails authorization only to the hosts in place on the whitelist. It seems that by default it's relaying everything, so i would like to stop doing that, and allow only the IP sources or networks that i whitelist ( and more precisely, where needs to be whitelisted ? on the configuration - mail proxy - whitelist , or Mail Filter - who objects )
Reject unknown clients is set to Yes
So in short i want to allow only specific IP's to relay mails via PMG, how can i do that.

Thank you in advance for any help ( i have searched the forum, and i did not find something similar with my case )
just in the process setting this up, could you please share the process with me ?
Thx!
 
Hi, so after reading the f.... manual :) i understood how this works.

On O365 side i created an relay connector on office 365 using this article ( https://learn.microsoft.com/en-us/e...-send-email-using-microsoft-365-or-office-365 ) and used that on the Mail Proxy - Default Relay
Then on Allowed network ( Mail Proxy - Networks ) i specified the corporate range of ip's so it relay them
On the Mail Filter i created an black list that contains the same list of networks as the one in Mail Proxy - Networks
I created an whitelist and added only the ip's or networks that are allowed to send mail ( internally )
In the mail filter rules i placed the whitelist in the highest priority and then the blacklist right above the spam ( lower priority so that ip's that are in the whitelist will be allowed, if not they will be blocked )
Since this is Internal only i have set the mail filter direction to in and out as i configured the internal port and external port as 25 and 587 ( so both of them can be used )
In this case the mail spam filtering is rather useless and i disabled it as it was delaying the mail delivery, i'm happy to use only the virus filtering and have some nice statistics on the mail flow and also the tracking center that help have an overall visibility of what's going on, in a nice way ( web gui )
Hope this clarifies
 
  • Like
Reactions: anullinger