How To Block Email From and Return-Path did not Match

Open /opt/zimbra/conf/salocal.cf.in. Please add these line at the bottom

score HEADER_FROM_DIFFERENT_DOMAINS 10.0

header __FROM_DOMAIN  From =~ /\@example.com/i
header __RETURN_PATH  Return-Path =~ /\@example.com/i
meta SPAM_DOMAIN !(__RETURN_PATH) && __FROM_DOMAIN
describe SPAM_DOMAIN From and return-path did not match our domain
score SPAM_DOMAIN 10.0

Note: Adjust example.com with your domain.

The configuration above will give a score of 10.0 if the domain and return path do not match. And will give a score of 10.0 if the header is from a different domain. You can give another value like 20.0 to discard the email.

Make sure your antispam service has been enabled

zmprov ms `zmhostname` +zimbraServiceEnabled antispam
zmcontrol restart

Comments

Popular posts from this blog

Disabling Zimbra's AntiSpam, Amavis and AntiVirus filtering

Cambium cnPilot E400/E410/E500 Configuration Tutorial

Error "Unable to retrive Zimbra GPG key for package validation"