It seems like your browser didn't download the required fonts. Please revise your security settings and try again.

How can I configure my Email Security Gateway to block messages that contain a certain word or phrase in the subject?

  • Type: Knowledgebase
  • Date changed: one year ago

Solution #00003682

Email Security Gateways, all firmware versions.


If you would like to configure your Email Security Gateway to block certain words and phrases, you can do so by navigating to:

Firmware version 3.5x and earlier
Navigate to Block / Accept > Subject Filtering.

Firmware version 4.0.x and later
Navigate to Block / Accept > Subject/Header Filters.

Firmware version 6.x and later
Navigate to Block / Accept > Content Filters.

Here, enter the words and phrases you would like to stop appearing in email subject lines under the Subject Blocking heading. Enter one word or phrase per line, and after clicking Save Changes, any new email that contains any of these words or phrases will be blocked. The reason in the message log will appear as Subject( ), with the word or phrase appearing between the parenthesis. You can also specify subject words and phrases that will cause a message to be quarantined, tagged, or whitelisted in the same way beneath the Subject Quarantine, Subject Tagging, and Subject Whitelisting headings, respectively.

Spammers often complicate words to get around simple blocks like these. For example, viagra may appear as \/1@gr4, or money as /\/\0n3y. For this reason, using Subject Filtering to block spam is not recommended. This feature is intended for policy enforcement and immediate responses for specific issues. However, if you would like to write more general rules to block different permutations of the same words and phrases, the Subject Filtering engine supports regular expressions. For more information, see Solution #00003273.

Additional Notes:

For exact words and phrases, it is generally a good idea to enter \b immediately before and after your word or phrase, like this:


The \b means word boundary, and will prevent possibly legitimate, longer words from being blocked. In the example above, these would include specialist and socialism, and using the \b word boundaries would allow emails with these in the subject through the Email Security Gateway.

Link to This Page: