## Please enable JavaScript to view this site.

# MDaemon Messaging Server 23.5

- Zoom Window Out
- Larger Text | Smaller Text
- Hide Page Header
- Show Expanding Text
- Printable Version
- Save Permalink URL

Creating a New Content Filter Rule | Scroll Prev Top Next More

This dialog is used for creating Content Filter Rules. It is reached by clicking the New Rule button on the Content Filter dialog.

Create Rule

Name this rule

Type a descriptive name for your new rule here. By default it will be called "New Rule #n".

Conditions...

This box lists the conditions that may be applied to your new rule. Click the checkbox corresponding to any condition that you want to be applied to the new rule. Each enabled condition will appear in the Rule Description box below. Most Conditions will require additional information that you will specify by clicking on the Condition's hyperlink in the Rule Description box.

If the [HEADER] contains—Click any of these options to base your rule on the content of those particular message headers. You must specify the text for which to scan. This condition now supports regular expressions. See Using Regular Expressions in Your Filter Rules.

If the user defined [# HEADER] contains—Click one or more of these options to base the rule on message headers that you will define. You must specify the new header, and the text for which to scan. This condition now supports regular expressions. See Using Regular Expressions in Your Filter Rules.

If the MESSAGE BODY contains—This option makes the contents of the message body one of the conditions. This condition requires you to specify a text string for which to search. This condition now supports regular expressions. See Using Regular Expressions in Your Filter Rules.

If the MESSAGE has Attachment(s)—When this option is selected, the rule will be contingent upon the presence of one or more message attachments. No additional information is required.

If the MESSAGE SIZE is greater than—Click this option if you want the rule to be based upon the size of the message. The size must be specified in KB. Default is 10KB.

If the MESSAGE HAS A FILE called—This option will scan for a file attachment with a particular name. The filename must be specified. Wildcards such as *.exe and file *.* are permitted.

If message is INFECTED...—This condition is TRUE when MDaemon determines that a message is infected with a virus.

If the EXIT CODE from a previous run process is equal to—If a previous rule in your list utilizes the Run Process action, you can use this condition to look for a specific exit code from that process.

If the MESSAGE IS DIGITALLY SIGNED—The condition applies to messages that have been digitally signed. No further information is required by this condition.

If SENDER is a member of GROUP...—This condition applies to a message when it is sent by an account that is a member of the account Group designated in the rule.

If RECIPIENT is a member of GROUP...— This condition applies to a message when its recipient is a member of the account Group designated in the rule.

If ALL MESSAGES—Click this option if you want the rule to be applied to all messages. No further information is required; this rule will affect every message except those to which a "Stop Processing Rules" or "Delete Message" action has been applied in a previous rule.

Actions...

MDaemon can perform these actions if a message matches the rule's conditions. A few Actions will require additional information that you will specify by clicking on the Action's hyperlink in the Rule Description box.

Delete Message—Selecting this action will cause the message to be deleted.

Strip All Attachments From Message—This action causes all attachments to be stripped from the message.

Move Message To Bad Message Queue—Click this action to cause a message to be moved to the bad message queue. An X-MDBadQueue-Reason header will be added to the message.

Skip n Rules—Selecting this action will cause a specified number of rules to be skipped. This is useful in situations where you may want a rule to be applied in certain circumstances but not in others.

For example: you may wish to delete messages that contain the word "Spam", but not those that contain "Good Spam". To accomplish this you could create a rule that deletes messages containing "Spam" and then place above it another rule that states "if the message contains "Good Spam" then Skip 1 Rule".

Stop Processing Rules—This action will skip all remaining rules.

Copy Message To Specified User(s)—Causes a copy of the message to be sent to one or more recipients. You must specify which recipients are to receive the message.

Append a corporate signature—This action makes it possible for you to create a small amount of text that will be appended as a footer to the message. Alternatively, it can add the contents of a text file. There is a Use HTML checkbox available if you wish to include HTML code in your signature's text. This Action supports the $CONTACT...$ signature macros.

For example: you could use this rule to include a statement that says "This email originated from my company, please direct any complaints or questions to user01@example.com".

Add Extra Header Item To Message—This action will add an additional header to the message. You must specify the name of the new header and its value.

Delete A Header Item From Message—This action will remove a header from a message. You must specify the header that you wish to delete.

Send Note To... —This action will send an email to a particular address. You will be able to specify the recipient, sender, subject, and a small amount of text. You can also configure this action to attach the original message to the note. Note: This action skips all messages that do not have a return-path. Therefore it cannot be triggered by, for example, Delivery Status Notification (DSN) messages.

For example: you might wish to create a rule that will move all messages containing "This is Spam!" to the bad message directory and create another rule that will send a note to someone letting them know that this has been done.

Remove Digital Signature—Click this action to cause a digital signature to be removed from the message.

Run Process...—This action can be used to run a particular program when a message meets the rule's conditions. You must specify the path to the program that you wish to run. You can use the $MESSAGEFILENAME$ macro to pass the name of the message to the process, and you can specify whether or not MDaemon should suspend its operations temporarily or indefinitely while it waits for the process to terminate. Further, you can force the process to terminate and/or run it in a hidden window.

Send Message Through SMS Gateway Server...—Click this option to send the message through an SMS Gateway Server. You must supply the Host or IP Address and the SMS phone number.

Copy Message to Folder...—Use this option to place a copy of the message into a specific folder.

MOVE the messages to custom QUEUE...—Use this action to move the message into one or more previously created custom mail queues. When moving messages to custom remote mail queues you can use the custom scheduling options on the Event Scheduler to control when those messages will be processed.

Add Line To Text File—This option will cause a line of text to be added to a specific text file. When choosing this action you will have to specify the path to the file and the text that you want to be appended to it. You may use certain MDaemon macros in your text to cause the content filter to dynamically include information about the message such as the sender, recipient, message ID, and so on. Click the Macros button on the "Add line to text file" dialog to display a list of permitted macros.

[Copy|Move] Message to Public Folders...—Use this action to cause the message to be copied (or moved) to one or more Public Folders.

Search and Replace Words in a Header—Use this option to scan a specified header for certain words and then delete or replace them. When creating this rule, click the "specify information" link in the Rule Description to open the "Header – Search and Replace" dialog on which you will designate the header and words to replace or delete. This action now supports regular expressions. See Using Regular Expressions in Your Filter Rules.

Search and Replace Words in the Message Body—Use this option to scan the message body and replace any desired text. This action now supports regular expressions. See Using Regular Expressions in Your Filter Rules.

Jump to Rule...—Use this action to jump immediately to a rule further down in the list, skipping over all rules between the two.

Send an instant message...—This action sends an instant message to someone when the message matches the rule's criteria. You will specify the To: email address, the From: address, and content of the message.

Add to Windows Event Log...—Use this action to log a text string to the Windows Event Log. You can use macros in the string, and there is a button to display the permitted macros.

Extract attachments to folder...—Use this action to extract attachments from a message. You will specify the folder to which the attachments will be copied, and you can choose to remove the attachment from the message after extraction. You can also set conditions to determine which attachments will be extracted, based on the file name, content type, and size of the attachments.

Change message processing priority...—This action is used to set the processing priority of the message, from "10 (Urgent)" to "90 (Retry)". The default settings is "50 (normal)."

Sign with DKIM selector...—Use this action if you want the rule to cause a message to contain a DKIM signature. You can also use it if you wish to sign some messages using a selector other than the one designated on the DKIM dialog.

Flag message for REQUIRETLS...—Indicates that the message should use REQUIRETLS.

[Sign|Encrypt|Decrypt] message with the user's [Private|Public] key...—Use these actions to sign, encrypt, or decrypt a message using a private or public key. See: MDPGP for more information. Note: these actions will be performed even when MDPGP is disabled.

Add a warning to the top of the message...—Use this action if you wish to add some sort of warning to the top of a message. You enter a string of plain text or enter HTML code and check the "Use HTML" box. Alternatively, you can load the text from a file.

Add an attachment...—Use this action if you wish to attach a file to a message that meets the rule's criteria. The file must be contained in the ./MDaemon/CFilter/Attachments/ folder.

Extract attachment and add link...—Use this action if you wish to extract attachments from messages that meet the rule's criteria, and add a link to them. See: Attachment Linking.

Rule description

This box displays the new rule's internal script format. Click any of the rule's conditions or actions (listed as hyperlinks) and the appropriate editor will be opened for specifying any needed information.

See:

Content Filter Editor

Modifying an Existing Content Filter Rule

Using Regular Expressions in Your Filter Rules

MDaemon v23.5.0 - September 2023. Copyright © 1996-2023. All rights reserved. MDaemon Technologies