[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

Create an Exchange rule

I think what I want to do is quite straightforward but I can't see the how to implement it.

We have some emails coming in to our exchange server from an external source that are duplicates of messages we already have, these are generated from a server outside our control so we can't stop them but they all have INTERNAL at the start of the subject line.

Quite simply what I want to do is get exchange to not delivery / delete any messages where the subject line starts INTERNAL but not any message that contain INTERNAL. So for example 'INTERNAL abc' would be deleted but 're: INTERNAL abc' wouldn't.

I thought I could implement this as a hub transport rule but I can only get that to work when the whole subject line matches, how do I enter INTERNAL followed by a wildcard?
Dave Robinson
Dave Robinson
2 Solutions
Joseph DalyCommented:
You should be able to accomplish this task using the transport rule called

"When the subject field matches text pattern"

This option allows you to use a regular expression to create the filter which is used to bounce back the message. I have done this in the past however I did have to reach out for help with the regular expression creation.

Terry WoodsIT GuruCommented:
The regular expression pattern will likely work is:

Open in new window

The ^ matches the start of the string.

If you also require a space character after the word, you can append that onto the end of the pattern.

This advice is based on my experience with regular expressions; not on any experience working with Exchange. However, that pattern syntax is very standardised between languages and tools, so you're unlikely to have trouble with it.
Dave RobinsonAuthor Commented:
Sorry for the delay in responding, everything went pretty crazy and I didn't have chance to test out the solution. Have given it a try now and it looks like its working so thank you to both of you for your help.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now