How do I block or allow messages based on language?
To do this you need to set up a Block list or Allow list Filtering Rule.
- In the Admin Level or Domain Level Control Panel, select Incoming - Protection Settings > Block list filtering rules or Allow list filtering rules
- Navigate to the appropriate tab: Domain Rules or Admin Rules
- Click on + Add rule
- Configure the rule as per the filter rule type:
Simple Filtering Rule
- In the Rule name field, give the rule a name which will make it clear that this rule is used to block or allow a specific language
- In the Match dropdown, select Language
- Ensure is is selected from the match operators dropdown
- In the text field enter the desired ISO 639-1 two-digit code. For example:
This will not apply to messages encoded with UTF-8 (in any language).
Advanced Filtering Rule- In the Rule name field, give the rule a name which will make it clear that this rule is used to block or allow a specific language
- Specify the priority of this rule, this is the order in which this rule will be applied (lowest number = highest priority, highest number = lowest priority)
- In the Match dropdown, select Language
For the Match criteria, the Test String box will provide examples of the kind of information you might need to include in the regular expression.
These are examples only, please ensure you have correctly adapted this in your Regular Expression before applying.
- You will see the Content Type box has now changed to Automatic or specified - in this box you can specify if the language match should be done via automatic detection or when the sender specifies
By default, language matches will be done against both automatic language detection and when the sender specifies the language.
- Write the Regular Expressions of the language(s) you wish to include in the rule using the ISO 639-1 two-digit code
- Add a flag if required in the Flags text box
The advanced filtering rule dialogs provide a cheatsheet of some useful features for use in regular expressions.
We cannot take any responsibility for any incorrectly applied regular expression rules, so please ensure you have thoroughly tested these outside Mail Assure before implementing them into the Mail Assure environment. There are a number of online regex checker tools that can be used for this.
- Click Save to add the rule. In the example above, all incoming messages in the language depicted by the ISO 639-1 code zh will be blocked or allowed
The dialog that is displayed here depends on whether you have enabled or disabled the Use advanced custom filtering rules option in the User profile page. For more information, see Manage Your Admin User Profile or Manage Your Domain User Profile.