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 a attachment for security purposes. 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 user defined 1 header contains
- If the MESSAGE has attachment(s)
- Click userdef1: to bring up the user defined header window.
- Enter Return-path and click OK.
- 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 in between the two conditions 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.
- For example [WARNING - REMOTE ATTACHMENTS]
- Leave a single space after your desired tag for the original subject line.
- Select Regular Expression
- Click OK