Mail rule is not applied to certain messages

1

2

We are running an Exchange 2013 / Outlook 2016 (Office 365) environment. Some messages, system generated notifications, are not processed correctly by our mail rules. The rules are server-side rules set in OWA. Mailbox 1 is a users personal mailbox, mailbox 2 is a shared mailbox that this explicit user has full access to.

Rules Mailbox 1:

If subject contains string forward mail to mailbox 2

Rules Mailbox 2:

If subject contains string move message to folder folder 1

string identifies the message by its subject, "Code 140" in that case. When I send a message from my Outlook client to mailbox 1 containing the string it gets processed perfectly fine - forwarding and moving works.

Any message with the exactly same subject that is being sent from an automated notification webservice is not being processed by the rules and therefore remains in mailbox 1 inbox, though it should be forwarded and moved. Those messages are encoded in UTF-8 - but other UTF-8 encoded messages are processed too, so it shouldn't be the problem.

The rules were deleted and added again multiple times, everytime with the same result. Client-side cache mode was deactivated for testing purpose but the user prefers it to be enabled, since it made no difference, it is active in the current configuration.

I compared the message headers of a mail that triggers the rules and one that doesnt. The Subject-property is identical to the last bit.

Wireshark trace of a not processed mail (POP3 from external mailserver): Not working

Wireshark trace of a processed mail (POP3 from external mailserver): Working

Powershell Output when searching for the rules:

[PS] C:\Windows\system32>Get-Mailbox | Where-Object {$_.Alias.Contains("username")} | Get-InboxRule -ErrorAction:SilentlyContinue | Where-Object {$_.Name.Contains("Code")} | select Description | fl

Description : Wenn die Nachricht folgende Bedingungen erfüllt:
              die Nachricht enthält bestimmte Wörter im Betreff: 'Code 140'
          Folgende Aktionen ausführen:
              die Nachricht in Ordner 'Online' verschieben
              und keine weiteren Regeln für diese Nachricht verarbeiten


Description : Wenn die Nachricht folgende Bedingungen erfüllt:
              die Nachricht enthält bestimmte Wörter im Betreff: 'Code 140'
          Folgende Aktionen ausführen:
              Nachricht an "'email@domain.de'" umleiten
              und keine weiteren Regeln für diese Nachricht verarbeiten

Which is german for forward ("umleiten") and move ("verschieben"). "Code140" is the string I want to trigger the rule with. As stated above, only one rule per mailbox is active (Mailbox 1 --> Forward to Mailbox 2, Mailbox 2 --> Move / Sort in Folder "Online")

Is there any further way to troubleshoot this, since it only affects the system-generated mails?

HannesS

Posted 2016-12-05T13:00:49.260

Reputation: 153

Did you check that the rule itself would trigger on any mail and doesn't contain a specific sender or similar? – Seth – 2016-12-05T13:50:07.587

Yes, the rule triggers for any mails (sent from 5-6 different accounts for testing), just not the ones I want :-) The rule itself contains only "If subject contains..." as a one-line criteria (verified multiple times again via OWA and PowerShell). I've added my powershell code to verify the rules in the question. – HannesS – 2016-12-05T14:45:59.217

I would've pointed out that the rules state keine weiteren Regeln für diese Nachricht verarbeiten which would mean the processing would end after either rule is processed but you've stated that neither get executed. Consider using 4 space idention/tab instead of quote to have it properly handle $_. Did you check the other rules? Maybe one indeed stops the processing if the mail comes from the automated system? – Seth – 2016-12-05T15:06:25.657

2Those 2 rules I get returned with the PowerShell script are set on a single mailbox each, meaning 1 mailbox has the "forward" rule, the other one has the "move" rule - they just appear in this cmdlet together because i query all mailboxes and get every rule to every mailbox. For testing purposes there are only those two rules active on their respective mailbox (MB1 --> "forward", MB2 --> "move") - no other rules involved / active. – HannesS – 2016-12-05T15:15:25.853

No answers