[SOLVED] Exchange Mail Flow Rules and + addresses

HCHTech

Well-Known Member
Reaction score
4,156
Location
Pittsburgh, PA - USA
I'm working with a new software, trying to get it's email notifications to create tickets in our CRM. Some software has very robust notifications, you can control the content enough that I can have it send its notifications directly to our CRM. With most things, though, it's a little trickier. We have to parse the subject line or the body of the notification email to figure out which client it is from. This lets us create a Mail Flow rule in M365 to forward the mail to our ticketing system, appending the right information to the subject line (for example) to assign it to the right client.

However, this latest software is trying to be more secure -- we get no control at all over the content of the notification email, and the body of the email is really an image of text and the subject line is generic, so I can't use parsing like normal to identify the source. I thought I had a bright idea of using "+" addresses, though. If your M365 email address is company@domain.com, then someone can send an email to company+accounting@domain.com, for example, and you will still receive it. So I set the software at the client's location to send it's alerts to my notification address, but adding a client identifier like this: notifications+CLIENTNAME@mydomain.com. Then, I built my mail flow rule to forward any email received for that address to my ticketing system. Unfortunately, it appears that M365 just ignores the part after the plus sign because my mail flow rule isn't firing when an email is received.

Thinking about this, it kind of makes senses. Plus addresses work because Exchange in essence ignores the plus sign and everything afterwards. That probably leads directly to the inability to route mail with a rule using any of that information.

Am I missing anything?
 
Do you not have control over the content of the Subject line? If you don't, then the following suggestion won't work, but if you do I'd suggest doing something like pre-pending the subject with [clientname] and filtering on that.
 
we get no control at all over the content of the notification email,

Sadly, no. No control at all over the email's content. That's what make this one hard. The only thing we can control is the recipient of the notification. I might be able to do it by creating a shared mailbox for each client on my domain, but man, I really don't want to do that - it's not a scalable solution. If I'm honest, the Exchange Rule method isn't really scalable either - we've got about 300 of those now, they work, but it wouldn't be a solution for a company with 1000 clients, that's for sure.
 
it's not a scalable solution.

I don't know of anything of this nature that is "effortlessly scalable." When you have to do "specific thing X" for "specific person/entity Y" that means custom work, even if that's copying a rule you have, adjusting it accordingly, and saving at as the next in a sequence.

I'm actually shocked that the "+clientname" part is being ignored as far as rules go. If it's not stripped from the message header, and I can't believe it would be, it should be something that examining the "To:" field could access.

The Groups.io email service uses the method you note as a way of differentiating groups and I know I can create rules based on the From field in that case in Outlook 365.
 
Well, as with many things, a night's sleep solved this issue.

There are multiple ways to test the incoming message in the Mail Flow Rule setup:

1. Apply rule if "The Recipient"...."Is this person"....and then entering the plus address - This way does NOT work to detect plus addresses

2. Apply rule if "This Message"....."To box contains this person"...and then entering the plus address - This way DOES work to detect the plus addresses.

Good luck finding that in the documentation - haha.
 
Back
Top