Rewrite message subject based on recipient
Problem
Some time ago, a user had a problem because his company switched to a new email-to-fax service. They had a security requirement to prepend a fax number to the subject of each email sent to them. He wanted to automate this so users would not need to manually add the number to the subject.
So the requirement is that messages which are sent to fax@super-service.com must have subject in format:
123-555-789: Message subject.
Where Message subject is an original message subject before modifications and 123-555-789 is a fax number.
Solution
We need to create a rule with Message Recipient condition and Modify Message action.
- Go to [Server] > Rules > Default Rules and click Add Rule button.
- In new opened window, go to Actions tab and click Add button, choose Modify Message Subject menu.
- Now define how the subject should look after rewriting. Based on our requirement, it should be in
123-555-789: $SUBJECTformat, where$SUBJECTis a placeholder that will be replaced with the original message subject. - Go to Conditions page and click Add button, select Message Recipient menu.
- Enter a recipient email address:
fax@super-service.com. Select in which fields address will be searched. - On the Name page set a rule name, it should be a name which briefly describe actions made by this rule, for example: Modify subject for fax service.
- Click OK button, then Save All to save current settings.
Rule wizard provide many variations of actions, ie. Modify Message Subject.
Summary
Now when someone sends a message to the fax service email address, the fax number will be prepended to the message subject.
To learn more visit MSH Traffic Policy website.