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
- Log in to the Zimbra web interface as an administrator.
- Go to Configure > SpamAssassin.
- Click on the Edit button next to SpamAssassin Configuration.
- In the SpamAssassin Configuration page, scroll down to the SpamAssassin Rules section.
- Click on the Add Rule button.
- In the Add Rule page, enter the following information:
- Pattern:
@${domain_name}
(replacedomain_name
with the domain name you want to block). - Action:
REJECT
. - Description: (optional) Enter a description for the rule.
- Pattern:
- Click Save to save the rule.
Method 2: Block a domain using Amavis
- Log in to the Zimbra web interface as an administrator.
- Go to Configure > Amavis.
- Click on the Edit button next to Amavis Configuration.
- In the Amavis Configuration page, scroll down to the Amavis Rules section.
- Click on the Add Rule button.
- In the Add Rule page, enter the following information:
- Pattern:
@${domain_name}
(replacedomain_name
with the domain name you want to block). - Action:
REJECT
. - Description: (optional) Enter a description for the rule.
- Pattern:
- Click Save to save the rule.
Method 3: Block a domain using Zimbra's built-in domain blocking feature
- Log in to the Zimbra web interface as an administrator.
- Go to Configure > Global Settings.
- Scroll down to the Domain Blocking section.
- Click on the Add Domain button.
- Enter the domain name you want to block in the Domain field.
- Select the Block option from the Action dropdown menu.
- 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.