SOLVED

Using header information as variables in rules / prefix settings

%3CLINGO-SUB%20id%3D%22lingo-sub-788388%22%20slang%3D%22en-US%22%3EUsing%20header%20information%20as%20variables%20in%20rules%20%2F%20prefix%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-788388%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20day.%20We're%20using%20a%20shared%20mailbox%20to%20track%20emails%20sent%20to%20ex-employees%20by%20moving%20their%20email%20aliases%20to%20the%20mailbox.%20I'd%20like%20to%20create%20a%20mail%20flow%20rule%20to%20grab%20the%20original%20address%20the%20email%20was%20sent%20to%20(olduser%40ourcompany.com)%20and%20place%20it%20into%20the%20subject%20or%20data%20sections%20as%20a%20prefix.%20Since%20they%20all%20land%20in%20the%20same%20mailbox%2C%20it's%20hard%20to%20sort%20and%2For%20see%20who%20the%20original%20recipient%20would%20have%20been.%20We%20do%20this%20for%20things%20like%20potential%20spoofing%20emails%2C%20but%20I%20can't%20find%20a%20reference%20to%20using%20a%20message%20header%20field%20anywhere%20as%20a%20variable.%20Anyone%20do%20something%20like%20this%20before%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3CP%3EEric%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-788388%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-788512%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20header%20information%20as%20variables%20in%20rules%20%2F%20prefix%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-788512%22%20slang%3D%22en-US%22%3E%3CP%3ENo%20way%20to%20do%20this%20with%20transport%20rules%2C%20you%20will%20have%20to%20use%20a%20custom%20transport%20agent%20(which%20is%20not%20supported%20in%20ExO).%20Perhaps%20instead%20of%20plain%20forwarding%20you%20can%20set%20up%20inbox%20rules%20that%20forward%2Fredirect%20the%20messages%20and%20prefix%20them%20with%20some%20string%20at%20the%20same%20time.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-788515%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20header%20information%20as%20variables%20in%20rules%20%2F%20prefix%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-788515%22%20slang%3D%22en-US%22%3EThanks%20Vasil.%20That's%20a%20good%20idea.%20I%20was%20trying%20to%20get%20rid%20of%20the%20older%20accounts%20more%20quickly%2C%20which%20was%20the%20reason%20for%20using%20the%20shared%20mailbox%20but%20I%20might%20have%20to%20just%20go%20back%20to%20the%20old%20method.%20Thanks%20again!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-792844%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20header%20information%20as%20variables%20in%20rules%20%2F%20prefix%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-792844%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F314236%22%20target%3D%22_blank%22%3E%40exigenttechguru%3C%2FA%3E%2C%20you%20can%20try%20to%20use%20free%20%3CA%20href%3D%22http%3A%2F%2Fivasoft.com%2Fshowaliasowa.shtml%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EShowAlias%3C%2FA%3Eutility%20-%20it%20looks%20like%20it%20might%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Good day. We're using a shared mailbox to track emails sent to ex-employees by moving their email aliases to the mailbox. I'd like to create a mail flow rule to grab the original address the email was sent to (olduser@ourcompany.com) and place it into the subject or data sections as a prefix. Since they all land in the same mailbox, it's hard to sort and/or see who the original recipient would have been. We do this for things like potential spoofing emails, but I can't find a reference to using a message header field anywhere as a variable. Anyone do something like this before?

 

Thanks!

Eric

3 Replies
Highlighted

No way to do this with transport rules, you will have to use a custom transport agent (which is not supported in ExO). Perhaps instead of plain forwarding you can set up inbox rules that forward/redirect the messages and prefix them with some string at the same time.

Highlighted
Thanks Vasil. That's a good idea. I was trying to get rid of the older accounts more quickly, which was the reason for using the shared mailbox but I might have to just go back to the old method. Thanks again!
Highlighted
Solution

@exigenttechguru, you can try to use free ShowAlias utility - it looks like it might help.