User Tools

Site Tools


internet:mail:zimbra:zimbra_white_black

Zimbra - Whitelist or Blacklist

Spamassassin

su - zimbra
vim /opt/zimbra/data/spamassassin/localrules/sauser.cf

then:

zmamavisdctl restart

sauser.cf

Do not use this example blindly. It must be modified. Older example:

use_bayes 1
skip_rbl_checks 0
use_razor2 1
use_dcc 1
use_pyzor 1
dns_available yes

## Optional Score Increases
## Choose your preferred values...
score DCC_CHECK 4.000
score SPF_FAIL 4.000
score SPF_HELO_FAIL 4.000
score RAZOR2_CHECK 2.500
score PYZOR_CHECK 2.500
score BAYES_99 3.000
score BAYES_90 3.000
score BAYES_80 3.000
bayes_ignore_header Received: from localhost

## Black and White List
whitelist_from statistics@reporting.smtproutes.com
whitelist_from no-reply@my.swmailassure.com
whitelist_from support@vitelity.com
whitelist_from payments@ems.travelers.com

Old info below…

See also Zimbra Antivirus and Antispam

See also Zimbra DKIM Configuration

https://wiki.zimbra.com/wiki/Improving_Anti-spam_system

Howto: http://shahzadlinux.blogspot.com/2016/03/how-to-blacklist-or-whitelist-ip.html

By Sender E-Mail Address

:!: This will affect all users!

As root:

vim /opt/zimbra/data/spamassassin/localrules/sauser.cf

Add at the bottom, modifying for your needs:

## Black and White List
whitelist_from statistics@reporting.smtproutes.com
blacklist_from spammer@example.com

Restart the filter:

zmamavisdctl restart

Examples of Valid Entries

  • spammer@example.com - blocks/allows all email from spammer@example.com
  • example.com - blocks/allows all email from ANY address at example.com

By IP Address

Zimbra 8.5+

:!: As a last resort, you can add an IP address to the Postfix mynetworks definition of trusted hosts.

Become the zimbra user:

su - zimbra

Whitelist

vim /opt/zimbra/conf/postfix_rbl_override

xxx.xxx.xxx.xxx OK

then:

postmap /opt/zimbra/conf/postfix_rbl_override

zmprov mcf +zimbraMtaRestriction 'check_client_access lmdb:/opt/zimbra/conf/postfix_rbl_override'

Blacklist

vim /opt/zimbra/conf/postfix_blacklist

xxx.xxx.xxx.xxx REJECT

then:

postmap /opt/zimbra/conf/postfix_blacklist

zmprov mcf +zimbraMtaRestriction 'check_client_access lmdb:/opt/zimbra/conf/postfix_blacklist'

Restart the MTA

zmmtactl restart
internet/mail/zimbra/zimbra_white_black.txt · Last modified: 2020/03/25 10:52 by gcooper