Content filtering is a great way for System Administrators, Domain Administrators, and/or Users to perform actions on incoming emails that meet specific criteria. For example, it's possible to use content filters to delete messages with certain attachments (e.g., attachments with a .exe extension), forward messages from a specific email address to another account, move messages to a certain folder, or even alter the subject of a message by appending something to it prior to delivery. While content filters are most commonly used to organize email by moving messages to specific folders, they're extremely flexible and allows you to filter messages the way you want to.
Content Filtering is available to Users and Domain Administrators in the Settings and/or Domain Settings areas. System Administrators have a Content Filtering tab available to them for each domain that's managed on the SmarterMail server. In both the Settings and Domain Settings areas, there is a Content Filtering option in the navigation menu that's used to see any existing filters as well as to manage filters. That being said, the filters created are only viewable/editable by the role that created them. That means the domain content filters are only available to Domain Administrators and Users see their own filters. However, any filter created for a domain by a System Administrator is available to both the System Administrator and the Domain Administrator.
Once the Content Filtering section is accessed, any existing filters will be listed. Content filters run in order, from top to bottom. In addition, content filters run from top-down: that means that content filters created by System and/or Domain Administrators run first, then filters created by users. That means that if a message could be managed by more than one, it will be handled by the FIRST content filter encountered. So, if you're seeing weird or unexpected behavior for messages, you may want to re-organize the order of your filters. You do this by moving them by clicking the Up and Down arrows next to the content filter names, moving them up and down in the "order of operations." You may also want to contact your Domain Administrator to see if they have any content filters created that could be impacting message delivery.
NOTE: Some content filtering actions, such as a Forward action, do not work in conjunction with Plus Addressing as content filters are run BEFORE any plus addressing commands. Using both could lead to duplicate messages or other unwanted/unnecessary behavior.
To delete a content filter, simply select it from the list and click the Delete button.
To add a new content filter, click New. The following options will be available:
- Name - The friendly name chosen to describe the rule.
- Match Type - Because multiple conditions can be configured per content filter, SmarterMail provides the option to require ALL conditions to be met or ANY of the conditions to be met in order for the rule's action to be triggered. Select the appropriate option from this list.
- Enable wildcards in search strings (* and ?) - Wildcards can be used to replace a specific word, phrase or character, where a question mark (?) represents a single character and an asterisk (*) represents any text. For example, if you wanted to block firstname.lastname@example.org, email@example.com and firstname.lastname@example.org, you could enter email@example.com. If you wanted to block all sales addresses, you could enter sales* instead.
Click on New Condition to specify the criteria that trigger the rule's action(s). For each condition selected, you will be able to add specifications and enter any necessary details, as required. For example, if you choose to filter on 'From Address', you can enter one or multiple email addresses. If you choose to filter on 'Contains specific words or phrases, you can enter the specific text and choose to look for that text in an email's subject, message body, header, etc.
On many conditions, you also have the ability to reverse the logic of the criteria item by changing the Comparison selection. For example, imagine you only want to accept email from specific domains. You would choose the 'From specific domains' condition and set the Comparison field to 'Does Not Match". Any messages sent from domains that do not match what you've entered in the text box can be deleted.
Note: If you select a condition that requires a value to be entered, and the field is left blank, SmarterMail will ignore this rule.
The following conditions are available, separated by Condition Type:
- From specific addresses
- From specific domains
- From trusted senders
Contains Specific Words or Phrases
- Subject or Body
- From Address
- To Address
- Email header
- Anywhere in message
- To specific addresses
- To specific domains
- Only to me
- My address in to field
- My address not in to field
- My address in to or cc field
- Has any attachment
- Specific filenames
- Specific extensions
- Over specific size
- Flagged as a high priority
- Flagged as normal priority
- Flagged as low priority
- Message automated (no return address)
- Sender authenticated
- Message oversize
- Message undersize
- Received in date range
- Sent through a specific server (by IP address)
- Spam probability
Click on New Action to specify what should occur when an email triggers the content filter condition(s). Note: If you select an action that requires a value to be entered, and the field is left blank, SmarterMail will ignore this rule.
The following actions are available:
- Delete message - Deletes the message so that it will never arrive at your Inbox. Note: Messages deleted through content filtering cannot be recovered.
- Reroute message - Forwards the message to another email address. Unlike 'Forward message', this option will not store a copy of the email in your own account.
- Bounce message - Sends a message back to the sender of the email saying that the message was bounced. Note that the message is still delivered to you unless you choose to delete it as well. Note: If the system administrator has disabled bouncing, this option will function the same as the delete action.
- Move message - Delivers the incoming message to the folder you choose from the dropdown list. Note: If you later delete that folder and leave the content filter active, the filter will automatically create the folder when the action is triggered.
- Add Header - Adds an email header within the incoming message, which can be useful when performing additional filtering through Outlook or another email clients. Headers should be formatted like "X-someheadername: value"
- Add Text to Subject - Appends a prefix to the subject line of the email. This is useful for categorizing emails as the subject line will be altered to include the text you specify in the text box.
- Forward message - Forwards a copy of the message to another email address and leaves a copy of the message in your account as well.
- Mark as read - Automatically marks the messages as read, which means it will not show up in your inbox, or any other folder, as unread.
- Set Priority - Automatically elevates the priority of a message. For example, if you create a content filter that flags a message from a VIP, you may want to set the priority of the message to High as well to denote its importance.
- Flag message - Automatically flags the message for follow-up. This makes it easy to find messages that have been acted upon by your content filter.
Users can manually trigger one or more of their content filters to run against a specified email folder. The ability to run content filters on-demand is a convenient way to clean up the mailbox, as actions can be performed on EXISTING emails rather than incoming email only.
There are 2 ways a user can run a content filter on demand: from the right-click/context menu for a folder, or from the Content Filter page within Settings.
Context Menu Option
It's possible to run a content filter on a specific folder simply by right-clicking on the folder name and selecting Run Content Filter from the context menu that appears. Once clicked, a modal opens and you are able to select the content filter to run from the dropdown, then clicking OK. The filtering process may take some time to complete, but you may continue to work while the process runs in the background. When the filtering process has been completed, an Action Succeeded toast notification will appear within the Email section.
Content Filter Settings Page
To run filter actions on an email folder, use the checkbox to select the filters that should be triggered. Then click on the Run Content Filters button. In the Run Content Filters modal, choose the folder that should be processed and click OK. The filtering process may take some time to complete, but you may continue to work while the process runs in the background. When the filtering process has been completed, an Action Succeeded toast notification will appear within the Email section.
Important notes regarding on-demand filters:
- The 'Sent through specific server (by IP address)' and 'Sender Authenticated' conditions as well as the 'Bounce message' action cannot be used when manually running a content filter. If a filter contains one of the restricted actions or conditions as its only action or condition, the filter should be triggered manually. If a filter contains one of the restricted actions or conditions along with other actions or conditions, please note that the restricted action or condition will be omitted from the filter process.
- The 'Delete message' action will immediately purge the email from the system. Without Message Archiving enabled, these messages may not be recoverable.
- The 'Reroute message' action will delete the original copy of the email from your mailbox and forward it to the specified address. The From address of the forward will be the original sender.
- The 'Prefix Subject' action must re-write the message. It will attempt to timestamp the new message with the date from the message header. However, if the date cannot be parsed from the message header, the re-written message will show the current time.
- The 'Trusted Senders' condition will look for CURRENT trusted senders. It cannot look for messages from trusted senders that were configured at the time the message was delivered.
- Running content filters on-demand executes the filters in the order they appear. However, the on-demand process does not loop through messages multiple times to perform the filter actions. Instead, it will gather all of the actions it could run on the message first and then runs them in the order they would have been found.
- When there are multiple actions for one filter, the actions that don’t require a re-write of the message will be done first. For example, a message will be marked as read before it is moved to another folder.