Page 1 of 1

How to whitelist domain in spamassassin

Posted: Fri Aug 05, 2022 11:22 am
by isscbta
In your SSH, as root, run:

Code: Select all

mcedit /etc/spamassassin/local.cf
At the end of file, bellow dns_server 127.0.0.1 add email which you want to whitelist in this format:
whitelist_from *@domain.com

Example:

Code: Select all

# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
# Only a small subset of options are listed below
#
###########################################################################

#   Add *****SPAM***** to the Subject header of spam e-mails
#
# rewrite_header Subject *****SPAM*****


#   Save spam messages as a message/rfc822 MIME attachment instead of
#   modifying the original message (0: off, 2: use text/plain instead)
#
# report_safe 1

dns_server 127.0.0.1

whitelist_from *@domain.com
At the end you have to restart spamassassin.
On Debian version < 12, run:

Code: Select all

systemctl restart spamassassin
On Debian version >= 12, run:

Code: Select all

systemctl restart spamd