Rule using wildcard (or domain) for handling incoming emails

Copper Contributor

In line with the email security best practices recommended at Ignite this year, we are blocking our staff from using auto-forwarding rules in Outlook/Exchange Online.

However there are valid scenarios where they need to know certain urgent emails have been delivered.

We have many staff working for clients or partner companies in sensitive industries where they are not permitted to access Office 365 (or indeed any webmail service) while at work.


What I want them to be able to do on their Office 365 email, account is something like:


IF sender = * THEN send notification to


There are variations (perhaps include the subject line or from address in the notification, butt not the content), but that is the general idea.


I can do it for fixed email addresses such as, but can't find any way for end users to do this for domains ( or * or other wildcards (from:managersname@*).


I've tried in Outlook and Flow, but can't seem to make it work.


I know it is possible with a Transport Rule, but I don't feel inclined to give my end user enough access to create these, for some strange reason..


Is this doable in O365 in any way (Outlook, Exchange, Flow, anything) in a way that normal (non-technical) users are likely to be able to handle?






12 Replies

You can create a per-domain Outlook rule, if that's what you mean. Here's example article:


You cannot however create a rule that dynamically captures the domain part and uses it for the notification address. For that you will need some macro or other code solution.

Dear Vasil,

Appreciated your efforts but I found one more links its more specific and proper details.

This is gr8 stuff, man.

@robert grahame  Hmm, don't have much faith in your users.  Anyway, I'm looking for the correct wildcard in rules to check ANY incoming e-mail and then follow the rule.  Per domain basis is too cumbersome.

@Vasil Michev In "Add a Condition" select "Sender address includes" and add the domain name ex "microsoft". No @ or * needed. Then in "Add an action" select "Forward to" and add the email address that you want the emails forwarded to.


Similarly, you can use "Subject includes" or "Subject or body includes" in Add a condition to catch additional emails related to that client


I normally create these two rules to send all emails related to specific vendors to pre-defined folders. Makes it easy to organize my inbox.

Not sure if this is still applicable to you but i hope i can help anyone out there whose having the same issue as i am.


I've just discovered that you could use Regex to manipulate those dynamic information. For example, to exclude email addresses that consist "ups" from being attached with disclaimer when sending out, i added an except condition ("The sender address matches") with the value of \W*((?i)ups(?-i))\W*


You could use this link to test your Regular Expression.

@AmitBlogger this video is labeled incorrectly; this shows the steps for a specific email address rule - not an domain wide rule.

Agree. Ezoic is a contact you already have defined @AmitBlogger.


However, your suggestion led me to a working approach (previous one didn't work for me).


In my case I wanted everything that is coming from LinkedIn to land into a specific folder:


What made it to work for me was the "sent only to me" condition, together with the "" string. With "*" it didn't work before and with "sent only to me" I make sure it's unlikely any message that is not coming directly from Yammer.


Hope this helps

I really want this feature.

There is a guy named John Blue who claims that he recorded me and demands 950 BTC. He also has multiple email addresses with different domain name. Please implement wildcard blocking!!!

Hi @IgorArnaut,

if John Blue always spam you using "John Blue" as a sender display name, use this freeware: