CasperSecurity
#---------------------------------------------------------------------
# This file is part of iRedMail, which is an open source mail server
# solution for Red Hat(R) Enterprise Linux, CentOS, Debian and Ubuntu.
#
# iRedMail is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# iRedMail is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with iRedMail. If not, see <http://www.gnu.org/licenses/>.
#---------------------------------------------------------------------
#
# Sample SpamAssassin rules. It should be located at:
# /etc/mail/spamassassin/local.cf
#
# Shipped within iRedMail project:
# * http://iRedMail.googlecode.com/
#
# See also:
# $ man Mail::SpamAssassin::Conf
#
# These two lines will not affect due to Amavisd use its
# own variables setting in /etc/amavisd.conf.
required_score 5.0
rewrite_header subject [ SPAM ]
report_safe 0
lock_method flock
#
# Bayesian support
#
# References:
# - http://wiki.apache.org/spamassassin/BayesInSpamAssassin
# - http://svn.apache.org/repos/asf/spamassassin/branches/3.3/sql/README.bayes
# Addition plugin for Roundcube webmail to call sa-learn
# - http://www.tehinterweb.co.uk/roundcube/#pimarkasjunk2
#
use_bayes 1
bayes_auto_learn 1
bayes_auto_expire 1
# Store bayesian data in MySQL.
# Please make sure you have correct server address, port and database name.
#bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
#bayes_sql_dsn DBI:mysql:sa_bayes:127.0.0.1:3306
# Store bayesian data in PostgreSQL.
# Please make sure you have correct server address, port and database name.
#bayes_store_module Mail::SpamAssassin::BayesStore::PgSQL
#bayes_sql_dsn DBI:Pg:database=sa_bayes;host=127.0.0.1;port=5432
# SQL username and password.
#bayes_sql_username db_username
#bayes_sql_password db_password
# Override the username used for storing data in the database.
# This could be used to group users together to share bayesian filter data.
# You can also use this config option to trick sa-learn to learn data as a specific user.
#bayes_sql_override_username vmail
# Increase score for message which contains blacklisted or phishing URI
# URIBL
#score URIBL_SBL 3
# dbl.spamhaus.org
#score URIBL_DBL_SPAM 3
#score URIBL_DBL_PHISH 3
#score URIBL_DBL_MALWARE 3
#score URIBL_DBL_BOTNETCC 3
#score URIBL_DBL_ABUSE_SPAM 3
#score URIBL_DBL_ABUSE_REDIR 3
#score URIBL_DBL_ABUSE_PHISH 3
#score URIBL_DBL_ABUSE_MALW 3
#score URIBL_DBL_ABUSE_BOTCC 3
#score URIBL_DBL_ERROR 0
# multi.surbl.org
#score URIBL_WS_SURBL 3
#score URIBL_PH_SURBL 3
#score URIBL_MW_SURBL 3
#score URIBL_CR_SURBL 3
#score URIBL_ABUSE_SURBL 3
#score SURBL_BLOCKED 0
# multi.urlbl.com
#score URIBL_BLACK 3
#score URIBL_RED 3
#score URIBL_BLOCKED 0
# DNSBL
#score RCVD_IN_SBL 5
#score RCVD_IN_XBL 5
#score RCVD_IN_PBL 5
# Turn off ALL DNSBL (DNS Blocklists)
#skip_rbl_checks 1
# Turn off DNSBL: rhsbl.ahbl.org.
# Check /usr/share/spamassassin/20_dnsbl_test.cf to see the rule name.
score DNS_FROM_AHBL_RHSBL 0
score URIBL_AB_SURBL 0 0.3306 0 0.3812
score URIBL_JP_SURBL 0 0.3360 0 0.4087
score URIBL_OB_SURBL 0 0.2617 0 0.3008
score URIBL_PH_SURBL 0 0.2240 0 0.2800
score URIBL_SBL 0 0.1094 0 0.1639
score URIBL_SC_SURBL 0 0.3600 0 0.4498
score URIBL_WS_SURBL 0 0.1533 0 0.2140
# For SpamAssassin-3.2.x. Reference:
# http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Plugin_SPF.html
#do_not_use_mail_spf 0
#do_not_use_mail_spf_query 1
#ignore_received_spf_header 1
# Trusted networks. Examples:
# 192.168/16 # all in 192.168.*.*
# 212.17.35.15 # just that host
# !10.0.1.5 10.0.1/24 # all in 10.0.1.* but not 10.0.1.5
# DEAD:BEEF::/32 # all in that ipv6 prefix
# Local host (127.0.0.1) will automatically be trusted implicitly.
#trusted_networks 192.168/16
# Whitelist from SPF.
#whitelist_from_spf joe@example.com fred@example.com
#whitelist_from_spf *@example.com
# Whitelist from DKIM.
loadplugin Mail::SpamAssassin::Plugin::DKIM
whitelist_from_dkim *@paypal.com
whitelist_from_dkim *@linkedin.com
whitelist_from_dkim *@twitter.com
whitelist_from_dkim *@bounce.twitter.com
# Whitelist domains.
# Reference: http://wiki.apache.org/spamassassin/ManualWhitelist
#whitelist_from *@gmail.com
# Locales.
ok_locales all
# Some sample custom file rules. Refer to SpamAssassin wiki site for more
# details: http://wiki.apache.org/spamassassin/WritingRules
#
# Filter Headers.
# -- Subject
#header LOCAL_DEMONSTRATION_SUBJECT Subject =~ /\btest\b/i
#score LOCAL_DEMONSTRATION_SUBJECT 0.1
# -- From
#header LOCAL_DEMONSTRATION_FROM From =~ /test\.com/i
#score LOCAL_DEMONSTRATION_FROM 0.1
# -- Look at all the headers and match if any of them contain the specified regex:
#header LOCAL_DEMONSTRATION_ALL ALL =~ /test\.com/i
#score LOCAL_DEMONSTRATION_ALL 0.1
#
# Filter mail body.
#body LOCAL_DEMONSTRATION_RULE /test/
#score LOCAL_DEMONSTRATION_RULE 0.1
#describe LOCAL_DEMONSTRATION_RULE This is a simple test rule
# Decrease score for authenticated senders.
# IMPORTANT NOTES:
#
# 1) Please replace 'your\.server\.com' by the value of Postfix parameter
# "myhostname".
# 2) Please set 'smtpd_sasl_authenticated_header = yes' in Postfix main.cf.
#
#header AUTHENTICATED_SENDER Received =~ /Authenticated\ sender\:.*by\ your\.server\.com/
#describe AUTHENTICATED_SENDER Header 'Received:' contains 'Authenticated sender:'
#score AUTHENTICATED_SENDER -3
# Checks if domain name of an envelope sender address matches the domain name
# of the first untrusted relay (if any), or any trusted relay otherwise.
# https://wiki.apache.org/spamassassin/Rules/RP_MATCHES_RCVD
score RP_MATCHES_RCVD 0
# SPF mismatch
score SPF_FAIL 5
razor_config PH_SA_PLUGIN_RAZOR_CONF