How to Filter Exchange Online Email Subjects Containing Emojis
Question details
The user needs a method to filter or block incoming emails in Exchange Online that contain emojis or unusual non-word characters in their subject lines.

- Product
- Exchange Online
- Device & OS
- not provided
- Scenario
- Managing incoming spam or unwanted emails with emojis in the Microsoft 365 Exchange admin center.
- Observed behavior
- Exchange Online lacks a built-in, dedicated emoji filter, requiring administrators to set up custom mail flow rules to detect and route these messages safely.
Ensure you have Exchange administrator permissions in Microsoft 365 before creating or modifying mail flow rules. It is highly recommended to test your regular expressions on sample text to avoid accidentally filtering legitimate emails.
Create a Mail Flow Rule Using Regular Expressions
Set up a custom Exchange rule to detect non-word characters or emojis in the subject line and automatically route them to the Junk folder or apply a higher spam confidence level.
Because Exchange Online does not offer a standalone toggle to block emojis, administrators can use regular expressions (Regex) within a mail flow rule to identify unusual characters and handle them as suspected spam.
Log in to the Microsoft 365 Exchange admin center using your administrator credentials and navigate to 'Mail flow' > 'Rules' in the left-hand menu.
Click 'Add a rule' and select 'Create a new rule'. Give your rule a descriptive name, such as 'Filter Emoji Subjects', to easily identify it later.
Under 'Apply this rule if', select 'The subject or body' > 'subject matches these text patterns'.
Input a regular expression that targets the emoji Unicode ranges or non-word characters you want to filter (for example, target non-ASCII characters if appropriate for your region) and add it to the list.
Under 'Do the following', choose an action such as 'Modify the message properties' > 'set the spam confidence level (SCL)' to a higher value, or route the email directly to 'Junk Email'.
Save the rule and initially set its mode to 'Test with Policy Tips' or 'Test without Policy Tips'. Monitor the incident reports to ensure effectiveness before enabling it broadly.

Discover WPS Office: The Smart Alternative to Microsoft Office
While you manage your Exchange Online configurations, consider optimizing your daily document workflows. WPS Office is a powerful, lightweight, and free alternative to Microsoft Office, offering seamless file handling for individuals and businesses alike.

Frequently Asked Questions
Can I block specific emojis instead of all non-word characters?
Yes. You can paste the specific emoji directly into the text pattern field of the Exchange mail flow rule instead of using a broad regular expression. The rule will then trigger only when that exact emoji is present in the subject.
Will filtering non-ASCII characters block legitimate foreign language emails?
Yes, using a broad non-ASCII regex will likely catch legitimate emails written in languages like Chinese, Japanese, or Arabic. If your organization receives international emails, you must carefully refine your regex to target only specific emoji Unicode blocks.
What should I do if my mail flow rule is blocking normal emails?
Immediately change the rule's mode to 'Test without Policy Tips' or disable it entirely in the Exchange admin center. Review your regular expression and test it against the falsely flagged subjects to fine-tune your pattern parameters.




