How to Modify Email Headers

This article describes how to modify the email headers, using an Acceptance & Routing rule.

Solution

The method described in this article will allow you to modify specific headers, based on custom defined conditions.

We will use as an example the modification of the "From" header of a certain email message.

1) Log into the "Webadmin" interface as the "admin" user account.
2) Go to "Security & Filtering".
3) Select "Acceptance & Routing".
4) Go to the "Advanced Settings" tab.
5) Click on "Add acceptance / routing rule".
6) Assign a name to the rule in the "Name" field.
7) In the "Conditions" section, select the required match criteria for
this rule. For example: "Sender" -> "Email".

NOTE: You can customize the conditions section to match your requirements. Ex: You wish that the "From" header be changed when user a@domain.test sends an email to user b@domain2.test. This would require that you add an additional condition to the one mentioned at step 7, which would be: "Recipient" -> "Email" -> "Is" -> b@domain2.test.

8) Click the "Add condition" button.
9) Select the "Is" option and enter the desired account name.
10) In the "Actions" section, select: "Headers" -> "Modify header".
11) Click the "Add action" button.
12) Select the "From" option and enter the new desired value for this
header.

NOTE: Instead of the "From" header selected at step 12 you can also choose: "Subject", "To", "CC", "Size", or modify another header which you can define using the "Custom" entry.

13) Click the "Save Configuration" button.
OS: LinuxWindowsFreeBSDNetBSDOpenBSDSolaris
Distros: WindowsDEB based distros amd64FreeBSD 7.x