Warn before sending emails to list of untrusted domains

Super Contributor
Hi Techs,

I have been looking for ways to warn the users before emailing personal domains (gmail, aol, yahoo, etc).

Is there way to use untrusted domains instead of whitelisting trusted domains?


The end goal is to warn users when they emailing yahoo, gmail, other personal domains from any clients whether desktop, mobile or OWA.

Trying to use the two articles below to achieve the objective-



Thanks for help in advance!

3 Replies

@Moe_Kinani thank you for sharing, for this scenario is would be better to block it (instead of warn user). Warning usually is being done, when let say we have partner and their email is trusted but we don't want to share all company document with them, so we set policy if user accidently sending out some document, show warning to user.

However, for public domain like Gmail, Outlook.com, Yahoo, etc. it would be better to enforce blocking.

Hi Reza,

My issue is not related to Warn vs Block. I need to find way to warn/ block ‘list of untrusted domains’ instead of whitelisting trusted domains.

Microsoft seems to have powershell to whitelist ‘list of trusted domain’ NOT untrusted domains.

In the screenshot attached, Microsoft domain is the TrustedDomain, I need way to change it so I can add untrusted domains then I can add Aol, yahoo, etc.

Hope this clarifies it!

To get your mail server's IP address:

Type cmd on the Start menu to open a Command Prompt.

Type ping mail.yourservername.com to find your IP address and the host's server name.

check the IP using command prompt

If the server name in the ping results matches the name on the certificate, use it as the mail server name in Outlook.

If the name is different, ping the server name used in the certificate. If the IP address matches your mail server's IP address use it as the mail server name in Outlook.