This Knowledge Base (KB) article explains how to configure an external email warning banner in Microsoft Exchange Online using Mail Flow Rules. The banner helps users identify emails originating from outside the organization and improves protection against phishing or spoofing attempts.
Alternatively:
Set the rule name as:
External Email Warning Banner
The sender is located
Outside the organization
This ensures the rule applies only to emails received from external domains.
+ Add exception
The sender → IP address is in any of these ranges or exactly matches
192.0.2.0/24
203.0.113.5
Note:
Add all approved IP ranges provided by your email security vendor or security team.
Under Do the following, select:
Apply a disclaimer to the message
Then choose:
Prepend a disclaimer
Use the following sample HTML code:
<div style="border:2px solid #ff0000; background-color:#fff4f4; padding:10px; font-family:Calibri; font-size:14px;">
<b>Warning:</b> This email originated from outside the organization.
Do not click links or open attachments unless you recognize the sender and know the content is safe.
</div>
If the disclaimer cannot be inserted:
Wrap
This ensures the email is still delivered with the banner content attached.
Send a test email from an external email address and confirm:
| Issue | Possible Cause | Resolution |
|---|---|---|
| Banner not appearing | Rule disabled | Enable the rule |
| Banner applied to internal emails | Incorrect condition | Verify sender location setting |
| Banner missing for some external emails | Trusted IP exception configured | Review exception list |
| HTML formatting broken | Unsupported HTML tags | Use simple HTML formatting |