background

SpamExperts KnowledgebaseOther

Custom Filtering Rules

Custom Filtering Rules allow you to define your own whitelisting and blacklisting rules, for incoming and/or outgoing filtering. Custom Filtering Rules are powerful and you need to be careful when setting them, as when incorrectly used, you can end up whitelisting or blacklisting mail that you did not intend to.

Custom Rules can currently be used by Super-Admins and Administrators. By default, Administrators do not have access to the Outgoing Filtering whitelist rules, but a Super-Admin user may change this on the permissions page.

Setting up Simple Filtering Rules

In the Custom Filtering Rules pages, you have the ability to add filtering rules, and manage rules that were already added in the past. To add a rule, you need to click on the Add rule button.

When adding a rule from the Add Rule section you need to:

  • Select a domain. This selection can be:
    • Global - Applies to all domains regardless of their custom settings
    • Default - Applies to all domains that have the default settings enabled
    • Domain - Applies to the mentioned domain
  • Note that only a Super-Admin may create or modify global or default rules, but they are visible to Administrators
  • Add a rule name - this should be a human readable unique name that can be used later to identify what rules matched in the log search
  • Match - what part of the email content or meta-data the rule will match on
  • Select whether that part:
    • “Is”/”Is not” - an exact match
    • “Contains” / “Does not contain” - a partial match
    • “Starts with” / “Ends with” - matches at the start or end
  • Add the Criteria
  • Click Save


Adding Advanced Custom Filtering Rules

  • Please note that we do not offer support for creating / editing such rules. 

You also have the ability to add Advanced Custom Filtering Rules. For this section to be visible, you need to enable it from your “User’s Profile” page

  • Click on the Active button near “Use advanced custom filtering rules”
  • Click Save

Note, rules added in “advanced” mode will not be shown for users that are using the “simple” editing mode. Rules added in “simple” editing mode will be shown and can be edited in “advanced” mode.

Once you do this, in the Whitelist / Blacklist Filtering Rules pages, the Add section will look different, and you will be able to work with a more advanced dialog when adding your rules. You will now write “regular expressions” for rules.

You can either import them via CSV, or add them one by one using the Add rule button. To add a rule, you will need to:

  • Select a domain. This selection can be:
    • Global - Applies to all domains regardless of their custom settings
    • Default - Applies to all domains that have the default settings
    • Domain - Applies to the mentioned domain
  • Note that only a Super-Admin may create or modify global or default rules, but they are visible to Administrators
  • Add a rule name - this should be a human readable unique name that can be used later to identify what rules matched in the log search
  • Header Name - the name of the header that the rule matches on (Note this is only available for the “Header” match rules)
  • Content Type - the content type of the parts of the message that the rule matches on, e.g. text/html (Note this is only available for the “Decoded message” match rules)
  • Regular Expression - the rule that you want to add - the “cheatsheet” on the right provides hints about how to write expressions, and there is further information available from the links in the page introduction text
  • Match - what part of the email content or meta-data the rule will match on
  • Flags - regular expression flags, can be one or more of:
    • I - Matching is case insensitive
    • S - Make the special character ‘.’ match all characters, including newlines
    • M - When specified the special “^” character matches at the start of each line and “$” at the end of each line, instead of beginning and end of each string.
  • Test String - some example text suitable for testing the chosen match type will be provided here, and you can enter your own testing text as well. The parts of the text that match the regular expression you have entered will be highlighted, so you are able to verify that you are getting the results you intend. This text is not saved with the rule
  • Save

Blocking location and/or language

Language-codes supported:

af, ar, bg, bn, ca, cs, cy, da, de, el, en, es, et, fa, fi, fr, gu, he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, mk, ml, mr, ne, nl, no, pa, pl, pt, ro, ru, sk, sl, so, sq, sv, sw, ta, te, th, tl, tr, uk, ur, vi, zh-cn, zh-tw

Country value supported:

Andorra, United Arab Emirates, Afghanistan, Antigua and Barbuda, Anguilla, Albania, Armenia, Angola, Asia/Pacific Region, Antarctica, Argentina, American Samoa, Austria, Australia, Aruba, Aland Islands, Azerbaijan, Bosnia and Herzegovina, Barbados, Bangladesh, Belgium, Burkina Faso, Bulgaria, Bahrain, Burundi, Benin, Saint Bartelemey, Bermuda, Brunei Darussalam, Bolivia, Bonaire,  Saint Eustatius and Saba, Brazil, Bahamas, Bhutan, Bouvet Island, Botswana, Belarus, Belize, Canada, Cocos (Keeling) Islands, Congo,  The Democratic Republic of the, Central African Republic, Congo, Switzerland, Cote d'Ivoire, Cook Islands, Chile, Cameroon, China, Colombia, Costa Rica, Cuba, Cape Verde, Curacao, Christmas Island, Cyprus, Czech Republic, Germany, Djibouti, Denmark, Dominica, Dominican Republic, Algeria, Ecuador, Estonia, Egypt, Western Sahara, Eritrea, Spain, Ethiopia, Europe, Finland, Fiji, Falkland Islands (Malvinas), Micronesia,  Federated States of, Faroe Islands, France, Gabon, United Kingdom, Grenada, Georgia, French Guiana, Guernsey, Ghana, Gibraltar, Greenland, Gambia, Guinea, Guadeloupe, Equatorial Guinea, Greece, South Georgia and the South Sandwich Islands, Guatemala, Guam, Guinea-Bissau, Guyana, Hong Kong, Heard Island and McDonald Islands, Honduras, Croatia, Haiti, Hungary, Indonesia, Ireland, Israel, Isle of Man, India, British Indian Ocean Territory, Iraq, Iran,  Islamic Republic of, Iceland, Italy, Jersey, Jamaica, Jordan, Japan, Kenya, Kyrgyzstan, Cambodia, Kiribati, Comoros, Saint Kitts and Nevis, Korea,  Democratic People's Republic of, Korea,  Republic of, Kuwait, Cayman Islands, Kazakhstan, Lao People's Democratic Republic, Lebanon, Saint Lucia, Liechtenstein, Sri Lanka, Liberia, Lesotho, Lithuania, Luxembourg, Latvia, Libyan Arab Jamahiriya, Morocco, Monaco, Moldova,  Republic of, Montenegro, Saint Martin, Madagascar, Marshall Islands, Macedonia, Mali, Myanmar, Mongolia, Macao, Northern Mariana Islands, Martinique, Mauritania, Montserrat, Malta, Mauritius, Maldives, Malawi, Mexico, Malaysia, Mozambique, Namibia, New Caledonia, Niger, Norfolk Island, Nigeria, Nicaragua, Netherlands, Norway, Nepal, Nauru, Niue, New Zealand, Oman, Panama, Peru, French Polynesia, Papua New Guinea, Philippines, Pakistan, Poland, Saint Pierre and Miquelon, Pitcairn, Puerto Rico, Palestinian Territory, Portugal, Palau, Paraguay, Qatar, Reunion, Romania, Serbia, Russian Federation, Rwanda, Saudi Arabia, Solomon Islands, Seychelles, Sudan, Sweden, Singapore, Saint Helena, Slovenia, Svalbard and Jan Mayen, Slovakia, Sierra Leone, San Marino, Senegal, Somalia, Suriname, South Sudan, Sao Tome and Principe, El Salvador, Sint Maarten, Syrian Arab Republic, Swaziland, Turks and Caicos Islands, Chad, French Southern Territories, Togo, Thailand, Tajikistan, Tokelau, Timor-Leste, Turkmenistan, Tunisia, Tonga, Turkey, Trinidad and Tobago, Tuvalu, Taiwan, Tanzania,  United Republic of, Ukraine, Uganda, United States Minor Outlying Islands, United States, Uruguay, Uzbekistan, Holy See (Vatican City State), Saint Vincent and the Grenadines, Venezuela, Virgin Islands,  British, Virgin Islands,  U.S., Vietnam, Vanuatu, Wallis and Futuna, Samoa, Yemen, Mayotte, South Africa, Zambia, Zimbabwe

Continent value supported:

Africa, Antarctica, Asia, Europe, North America, Oceania, South America

 

Action on the existing rules

To take action on an existing rule, you need to use the drop-down arrow to the left of the rule

Available actions:

  • Edit - allows you to adjust the existing rule
  • Copy rule - allows you to create a new rule starting from the existing one, or simply copy the existing one and apply it to a new domain
  • Remove - allows you to remove the rule
  • Export as .CSV - allows you to export the rule to CSV

You can also take action on several rules at once. For this to work, you need to:

  • Tick the checkboxes to the left of the rules you want to select
  • Use the drop down list at the bottom of the page.

Available actions:

  • Remove - allows you to remove the selected rules
  • Export to .CSV - allows you to export the existing rules to .CSV

Reviewing rules as super-admin or admin

To add, remove, or edit rules that apply to a domain, simply use add the domain in your filter selection at super-admin or admin level.

If you wish to see only the global or default rules (or, if super-admin, edit or remove these rules), simply use “global” or “default” as the domain filter value.

Enabling and Disabling use of the default rules

You are able to specify whether each domain should use the default rules (in addition to any that are defined only for the domain) or not. This will be available to domain users in the future - at the moment to do this requires a super-admin or admin to navigate to “domain level” and use the custom rules pages at that level.

On those pages, you can see the rules set for this domain, the default rules and choose whether or not these apply to that domain, and the global rules.

To specify if the Default Rules apply to the domain or not, you need to:

  • Navigate to the Default Rules Tab
  • Tick the checkbox near Yes or No

If you need to add a rule for that specific domain, you can follow the steps described in the Setting up Simple Filtering Rules section in this article. The only difference that you will notice is that the domain part is missing, as you are already at domain level. 


Was this article helpful?

Related articles

Search result for :