cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2887
Views
0
Helpful
11
Replies

Change from address

jdurlewanger
Level 1
Level 1

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.

11 Replies 11

Libin Varghese
Cisco Employee
Cisco Employee

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

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.

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

I was originally using just "From" but was not seeing it change. I changed it to Mail-From hoping for better results. Should it look like the attached screenshot?

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

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.

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

Is there a certain way you need to configure the search and replace? I cannot seem to get that to work.

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

dmccabej
Cisco Employee
Cisco Employee

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.

I have confirmed they are hitting the mail policy as another filter in the policy is triggered.

Action:

Add/Edit Header

Rule:

edit-header-text("Mail-From", "jdurlewanger@domain.com", "justatest@domain.com")