Block domain name in zimbra mail server

In Zimbra, you can block a domain name from sending emails by configuring the spamassassin and amavis settings. Here are the steps:

Method 1: Block a domain using SpamAssassin

  1. Log in to the Zimbra web interface as an administrator.
  2. Go to Configure > SpamAssassin.
  3. Click on the Edit button next to SpamAssassin Configuration.
  4. In the SpamAssassin Configuration page, scroll down to the SpamAssassin Rules section.
  5. Click on the Add Rule button.
  6. In the Add Rule page, enter the following information:
    • Pattern: @${domain_name} (replace domain_name with the domain name you want to block).
    • Action: REJECT.
    • Description: (optional) Enter a description for the rule.
  7. Click Save to save the rule.

Method 2: Block a domain using Amavis

  1. Log in to the Zimbra web interface as an administrator.
  2. Go to Configure > Amavis.
  3. Click on the Edit button next to Amavis Configuration.
  4. In the Amavis Configuration page, scroll down to the Amavis Rules section.
  5. Click on the Add Rule button.
  6. In the Add Rule page, enter the following information:
    • Pattern: @${domain_name} (replace domain_name with the domain name you want to block).
    • Action: REJECT.
    • Description: (optional) Enter a description for the rule.
  7. Click Save to save the rule.

Method 3: Block a domain using Zimbra's built-in domain blocking feature

  1. Log in to the Zimbra web interface as an administrator.
  2. Go to Configure > Global Settings.
  3. Scroll down to the Domain Blocking section.
  4. Click on the Add Domain button.
  5. Enter the domain name you want to block in the Domain field.
  6. Select the Block option from the Action dropdown menu.
  7. Click Save to save the changes.

After configuring one of these methods, emails from the blocked domain will be rejected by the Zimbra mail server.