Quote:
Originally Posted by Jbrabander Say, does anyone know...if an item hits the blacklist, does that make a note in a log file anywhere? If so, which log? |
Check your /var/log/zimbra.log.
The solution of editting of the salocal.cf file sets spamassassin to blacklist email addresses.
A better solution is where the email for particular email addresses can get rejected at the postfix level, so it doesn't have to go through the other stuff (spamassassin, amavis, etc.) and saves on memory and cpu usage. Here is my improved solution:
Step 1: Edit main.cf
Quote:
su - zimbra
cd /opt/zimbra/postfix/conf
vi main.cf
|
Step 2: Modify the "smtpd_recipient_restrictions".
Don't edit /opt/zimbra/postfix/conf/main.cf because it gets overwritten.. Add "check_recipient_access hash:<path and file name>" option for the blacklisted destination addresses to /opt/zimbra/conf/postfix_recipient_restrictions.cf:
Quote:
|
vi postfix_recipient_restrictions.cf
|
Quote:
reject_non_fqdn_recipient
permit_sasl_authenticated
permit_mynetworks
reject_unauth_destination
reject_unlisted_recipient
%%contains VAR:zimbraMtaRestriction reject_invalid_hostname%%
%%contains VAR:zimbraMtaRestriction reject_non_fqdn_hostname%%
%%contains VAR:zimbraMtaRestriction reject_non_fqdn_sender%%
%%contains VAR:zimbraMtaRestriction reject_unknown_client%%
%%contains VAR:zimbraMtaRestriction reject_unknown_hostname%%
%%contains VAR:zimbraMtaRestriction reject_unknown_sender_domain%%
%%contains VAR:zimbraMtaRestriction reject_rbl_client dnsbl.njabl.org%%
%%contains VAR:zimbraMtaRestriction reject_rbl_client cbl.abuseat.org%%
%%contains VAR:zimbraMtaRestriction reject_rbl_client bl.spamcop.net%%
%%contains VAR:zimbraMtaRestriction reject_rbl_client sbl.spamhaus.org%%
%%contains VAR:zimbraMtaRestriction reject_rbl_client xbl.spamhaus.org%%
%%contains VAR:zimbraMtaRestriction reject_rbl_client sbl-xbl.spamhaus.org%%
%%contains VAR:zimbraMtaRestriction reject_rbl_client relays.mail-abuse.org%%
check_recipient_access hash:/opt/zimbra/postfix/conf/blacklist_clients
permit
|
Step 3: Create the blacklist for email to reject with the email destinations listed:
Quote:
|
vi /opt/zimbra/postfix/conf/blacklist_clients
|
Note: The blacklist_clients (can be named anything, just keep it consistent with what you put in main.cf) contains: (my domain info replaced with example.com)
Step 4: Then create the postfix db:
Quote:
|
postmap /opt/zimbra/postfix/conf/blacklist_clients
|
That's it. No restart needed.

Zimbra (Postfix) took it pretty much immediately. Emails to those destinations will be rejected and dropped. Per /var/log/zimbra.log (my domain info removed):
Quote:
|
Feb 8 23:32:16 power postfix/smtpd[2530]: NOQUEUE: reject: RCPT from unknown[91.151.82.113]: 554 5.7.1 <eebec@example.com>: Recipient address rejected: Access denied; from=<whatever@doesntmatter.com> to=<eebec@example.com> proto=SMTP helo=<net91-151-82-ip113.gigabit.web.tr>
|
Someone could add that solution to
Improving Anti-spam system - Zimbra :: Wiki wiki. I tried to, but could not. I created an account in the wiki and after that,
Main Page - Zimbra :: Wiki just comes up as a blank page.
I like this solution much better. No spamassassin and no amavis used, so less memory and cpu used and is much faster to reject it. I have a legacy catch-all account which I still need. There are 60 non-existent addresses that the spammers target making up ~99% (pulled number out of the air, but that feels about right) of the spam I receive.