Reject Top Level Domains

Updated 1 week ago by admin

This article describes how to reject email from top level domains (TLD's) using a connection rule and Custom Rule Data.

Consider also using the "Sender IP Geolocation" condition in a Connection Rule to reject email based on its origin country. See this article for more details.

The following example describes how to create a rule to block any message originating from a .top or .win domain, which are commonly associated with spam.

  1. Click Products ⟶ Email Security ⟶ Custom Rule Data and click New followed by Rule RegEx
  2. Enter a new title for the Custom Rule Data e.g. Top Level Domains
  3. Paste the Regular Expression into the value box: \.top$|\.win$ (you can modify this to suit your requirements). Be careful to test the Regular Expression as this rule will reject any matching senders.
  4. Click Save
  5. click Products ⟶ Email Security ⟶ Connection Rules.
  6. Click the + button to create a new Rule.
  7. Enter a meaningful name, such as "Reject TLD", and click Add
  8. Add or drag the Direction condition into the rule and set the value to Inbound
  9. Add or drag the Sender condition into the rule and configure it to match the Top Level Domains value
  10. Add the Permanent Reject final action to the rule and select 5.1.8 sender denied as the value
  11. Save the rule and exit the Rule Builder
If you wish to Quarantine mail from the Top Level Domains rather than reject it, then you should use a Message Rule instead with one of the quarantine actions. This allows you time to ensure the rule is working as expected rather than simply rejecting completely at the connection level.


How did we do?