08-23-2016 09:01 AM
We have a third party utility that can action email. It can only action the email based on the specific sender address. So I want this tool to action all messages sent to a specific address but I cant do this without changing the from address to the same thing for all messages.
Is there a content filter I can use to change the from address for all messages sent to a specific email address?
I have been trying to use Add/Edit Header but I cant get this to work.
08-23-2016 01:08 PM
Using the content filter should allow you to re-write all from headers for emails directed to a specific email address.
Header: if (rcpt-to == "abc@domain.com") { insert-header("From", "pqr@domain.com"); }
This works correctly when I tested on my lab appliance.
Regards
Libin
08-23-2016 01:39 PM
Are you using the GUI or the CLI to do this? I would prefer to use the GUI so it can be easily tracked and added to.
08-23-2016 01:44 PM
I used the GUI to set up the content filter, just copied over the detail of the filter to share what the condition and action were.
I see the error in the condition above
mail-from is a SMTP command and not a header so the filter condition would not be able to edit it
You would need to edit the "From" header.
Regards
Libin
08-23-2016 01:52 PM
08-23-2016 02:02 PM
I used the action as "Specify Value for New Header", you could try that.
Ideally both should word as long as the conditions mentioned match.
Regards
Libin
08-23-2016 02:43 PM
I forgot to commit the changes. that worked.
There is a slight problem. It adds an additional header instead of changing the existing header. The new From: Header is at the top but I see the original header where it should be.
08-25-2016 08:12 AM
True, "Specify Value for New Header" would add to the existing address in the From header.
"Search & Replace from the Value of Existing Header" would replace the existing header with the new value mentioned.
Libin
08-25-2016 08:19 AM
Is there a certain way you need to configure the search and replace? I cannot seem to get that to work.
08-25-2016 08:27 AM
I tested it as in the screenshot attached, If it is the same for you I would suspect the search term is not matching the email.
Please note mail-from value and from header can be different, message tracking displays the mail-from while the email headers in outlook email client shows the from header.
Libin
08-23-2016 01:14 PM
Hello,
Have you already confirmed the emails in question are hitting the Mail Policy that you're Content Filter is applied to? Also that the Content Filter is enabled? What are the settings for your Add/Edit Header Content Filter? If any, that would be the action we want to use.
Thanks!
-Dennis M.
08-23-2016 01:38 PM
I have confirmed they are hitting the mail policy as another filter in the policy is triggered.
Action:
Rule:
edit-header-text("Mail-From", "jdurlewanger@domain.com", "justatest@domain.com")
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide