Community Knowledge Base

Content Filtering

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 allow 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.

Create/Edit Content Filters

When adding a content filter, the following cards will be available, each with options pertaining to the conditions you want to use for the rules, and the actions that are taken based on the conditions you set:


  • 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, and, you could enter sales?? If you wanted to block all sales addresses, you could enter sales* instead.


Click on New Condition to specify the criteria that triggers 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 Address

This condition allows you to select whether you want to run the filter against specific addresses or domains, or trusted senders. Then, you set the comparison type: whether the field matches or doesn't match the condition type. Then, you enter in the addresses or domains you want to use for the filter. The fields to use include:

  • From specific addresses
  • From specific domains
  • From trusted senders

Contains Specific Words or Phrases

This condition allows you to look in various areas for words or phrases, then take action when those words or phrases are found. You can set the comparison type, whether the words/phrases are found or not, and then the words or phrases you want to use for the filter. You can further refine a phrase search by enclosing the phrase in quotation marks. (The same can be done to individual words.) The fields to use include:

  • Subject
  • Body
  • Subject or Body
  • From Address
  • To Address
  • Email header
  • Anywhere in message

To Address

This condition allows you to look in the To: or Cc: fields for specific addresses or domains. You can set the comparison type, whether the address or domain are included in the selected field, then the addresses or domains you want to use for the filter. The fields to use include:

  • 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


This condition allows you to filter emails based on whether or not messages have attachments, or even by specific filename, extension type, or file size. The fields to use include:

  • Has any attachment
  • Specific filenames
  • Specific extensions
  • Over specific size


This condition allows you to filter based on a number of different criteria, including flag type, message size, spam probability, etc. The fields to use include:

  • Flagged as high priority
  • Flagged as normal priority
  • Flagged as low priority
  • Message automated (no return address)
  • Sender authenticated
  • Message over size
  • Message under size
  • 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.
  • Bounce message - Sends a message back to the sender of the email saying that the message was bounced, and not delivered. Note: If the system administrator has disabled bouncing, the sender is never notified and the message is simply deleted.
  • 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 other 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 you a copy of the message 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.

Manually Running Filters

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.

It's possible to run a content filter on a specific folder simply by selecting the folder name and the selecting Run Content Filter from the Actions menu icon that appears at the bottom of the SmarterMail interface. (It's to the right of the folders icon.) Once selected, 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 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 '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.