| Solution |
In FortiMail, it is possible to block incoming emails that are not in a specific language by utilizing a dictionary profile within an AS (Anti-Spam) profile or a content profile.
This article outlines two options to achieve this: One based on the alphabet and another based on GeoIP.
Option 1:
- Navigate to Profile Configuration:
- In the FortiMail web interface, navigate to Security Profiles.
- Under Anti-Spam (AS) Profiles, select AS Profiles.
- Create a New AS Profile:
- Select 'Create New' to create a new AS (Anti-Spam) profile specifically for language filtering.
- Name the profile according to the user preference (e.g., 'Language Filtering').
- Edit the New AS Profile:
- Select the newly created AS profile and select 'Edit'.
- Configure Language Filtering Rules:
- In the AS Profile settings, locate the Dictionary Profile section.
- Create rules to filter emails by language. Note that it is necessary to create rules for each language or language group to block. It is possible to do this in two ways:
- Alphabet-Based Rules: Create rules based on the alphabet used in the target languages. For example, to block emails in languages that do not use the Roman alphabet (e.g., Chinese, Japanese, Russian), create rules based on their respective alphabets.
- Keyword-Based Rules: For each language to allow (e.g., English, Spanish, Portuguese), create rules using keywords or common words associated with that language.
- Example Configuration:
Below is an example of a configuration that allows only the Roman alphabet (including English, Spanish, and Portuguese) and blocks emails in other languages:
edit NO_ROMANO config item edit 1 set pattern-type CANSIN set pattern-max-limit enable set pattern-status disable next edit 2 set pattern-type USSSN set pattern-max-limit enable set pattern-status disable next edit 3 set pattern-type CreditCard set pattern-max-limit enable set pattern-status disable next edit 4 set pattern-type ABAROUTING set pattern-max-limit enable set pattern-status disable next edit 5 set pattern-type CUSIP set pattern-max-limit enable set pattern-status disable next edit 6 set pattern-type ISIN set pattern-max-limit enable set pattern-status disable next edit 7 set pattern "[^\\x00-\\x7F]+" set pattern-max-limit enable next end next end
- Apply the AS Profile:
- After configuring the rules, go to Security Policies.
- Edit an existing policy or create a new one based on the email routing needs.
- Under AS Profile, select the custom AS profile just created (e.g., 'Language Filtering').
- Save the policy.
- Testing:
- Test the configuration with sample emails to ensure that the language-based filtering works as expected.
Option 2:
Based on GeoIP, they only accept emails that come from IPs from certain countries. See the following link for more information:
Configuring email, IP and GeoIP groups
|