outlook rule not working

Glenn Maxwell 14,226 Reputation points
2026-10-08T11:19:04.49+00:00

Hi All,

One of my users has the Outlook rule below configured, but it is not working as expected. For example, let's say the user's name is John Smith. Could someone please guide me on what might be wrong with the rule and how I can troubleshoot it?

Also, is it possible to manage this Outlook mailbox rule from Exchange Online PowerShell? Specifically, can I disable/delete the existing rule and create a new Outlook rule for the user, or modify the existing rule?

I am looking for an Outlook/Exchange Online mailbox rule, not an Exchange mail flow (transport) rule.

Rule Name: Rule1

Description:

If the message:

  • The message was received from abc or xyz[@]somedomain.com

Take the following actions:

  • Delete the message
  • Stop processing more rules on this message

Except if the message:

  • The message includes specific words in the subject or body: "John" or "john.smith[@]mydomain.com"
Outlook | Windows | Classic Outlook for Windows | For business
0 comments No comments

3 answers

Sort by: Newest
  1. Robert Sparnaaij [MVP] 18,406 Reputation points MVP Volunteer Moderator
    2026-10-09T06:22:22.7033333+00:00

    Are there any other rules configured which could end up deleting the message?

    To get all Inbox rules for this mailbox via PowerShell use:

    Get-InboxRule -Mailbox <email address>

    You can use the returned identities with Set-InboxRule to alter a rule.

    Additionally, there are:

    Was this answer helpful?

    0 comments No comments

  2. Glenn Maxwell 14,226 Reputation points
    2026-10-08T20:42:21.3733333+00:00

    Below exception is not working, emails are getting deleted even if the subject or body has John" or "john.smith[@]mydomain.com"

    Except if the message:

    • The message includes specific words in the subject or body: "John" or "john.smith[@]mydomain.com"

    Was this answer helpful?

    0 comments No comments

  3. Julie Huynh 3,850 Reputation points Independent Advisor
    2026-10-08T13:35:38.6666667+00:00

    Dear @Glenn Maxwell,

    Good day! Welcome to Microsoft Q&A forum!

    Thank you for providing the rule details.

    I performed a similar test in Classic Outlook, as the rule configuration shown in your screenshot appears consistent with the Classic Outlook Rules Wizard. In my testing, the rule behaved as expected: messages from the specified sender were deleted unless the subject or body contained one of the configured exception keywords, in which case the messages were retained.

    I created a similar rule:

    User's image

    To validate the behavior, I tested the following scenarios:

    • Test 1
      • Subject: Test 1
      • Body: Hello!!!

    User's image

    • Test 2
      • Subject: Julie
      • Body: Hello!!! Test 2

    User's image

    • Test 3
      • Subject: Test 3
      • Body contained the configured email address & Test 3

    User's image

    • Test 4
      • Subject: Test 4
      • Body contained the configured name

    User's image

    Results: The message that did not contain any exception keywords was deleted (Test 1), while all messages containing either the configured name or email address were retained (Tests 2,3,4).

    Based on these tests, the rule behaved as expected in my environment.

    User's image

    To better understand the issue in your environment, could you please clarify:

    • What specifically is not working as expected?
    • Are messages being deleted even when they contain "John" or "(the configured email)"? Or are messages not being deleted when they should be?
    • Can you provide a sample message (sender, subject, and expected versus actual behavior)?
    • Where does "John" or "(the configured email)" appear in the message (subject, body, signature, quoted text, etc.)?
    • Is abc configured as an email address, contact, or display name?

    Additionally, please let me know whether you are using Classic Outlook or New Outlook. I performed my testing in Classic Outlook because the rule description appears to match the Classic Outlook Rules Wizard. If you are using a different Outlook experience, that may be relevant to the investigation.

    Also, if this mailbox is hosted in Exchange Online, you can review the rule configuration through Exchange Online PowerShell using: Get-InboxRule

    Kindly let me know when there are updates or if you need further assistance. Any updates you’re able to share would be really helpful.

    I'm here and happy to help! Thank you for your kindness and patience!

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.