How to prepend a tag to the beginning of a header
Using MDaemon's content filter, it's possible to prepend a tag or line of text to a header.
One example of why this would be useful it to tag messages from external servers that contain attachment. A tag can be added to inform the end-user the message contain an attachment(s) and is not from an local user. This example will be detailed below. However, the rule can be modified to meet different conditions and/or include multiple actions.
- Open MDaemon
- Select Security
- Select Content Filter
- Select New Rule
For the Conditions...
- Choose the following conditions in this order:
- If the REPLY-TO HEADER contains
- If the MESSAGE has attachment(s)
- Click contains specific strings option in the Modify Rule window to bring up another window.
- Click the contains... option in the Specify Search Text to bring up another window.
- Select the drop down menu in the Options menu and choose Does Not Contain.
- Click OK
- Enter the local MDaemon domain and click add. (do not include any wildcards, just the domain).
- Enter any additional domain names that may be configured in MDaemon.
- Click OK
- Click the or link and change the condition login to AND.
For the Actions...
- Choose Search and replace within HEADER
- Click specify information to bring up the Header - search and replace window.
- Select Subject in the drop down list.
- Enter ^ in the Search expression text box.
- Enter the desired tag to add to the subject in the Replace with text box.
Leave a single space after your desired tag for the original subject line.
- For example [WARNING - REMOTE ATTACHMENTS]