intergrade /etc/mail/spamassassin/local.cf in to amavisd-new

Indunil Jayasooriya indunil75 at gmail.com
Thu Mar 3 10:35:49 CET 2016


Hi list,


i have a rule to block mails based on body in  /etc/mail/spamassassin/
local.cf

this is what i have written in /etc/mail/spamassassin/local.cf file

body LOCAL_SEX /\b(sex)\b/i
describe LOCAL_SEX Email contains the word sex.
score LOCAL_SEX 7.0


I sent a mail from my gmail account by adding word sex in my body as well
as in Subject .

But amavis does NOT block. It says Passed CLEAN


here are very important lines in amavisd,conf file


# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of
decoders&dearchivers


# $MYHOME = '/var/amavis';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = "/var/virusmails";
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse
quarantine

# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R

$db_home   = "$MYHOME/db";      # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
# $lock_file = "$MYHOME/var/amavisd.lock";  # -L
# $pid_file  = "$MYHOME/var/amavisd.pid";   # -P
#NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually

$log_level = 0;              # verbosity 0..5, -d
$log_recip_templ = undef;    # disable by-recipient level-0 log entries
$DO_SYSLOG = 1;              # log via syslogd (preferred)
$syslog_facility = 'mail';   # Syslog facility as a string
           # e.g.: mail, daemon, user, local0, ... local7
$syslog_priority = 'debug';  # Syslog base (minimal) priority as a string,
           # choose from: emerg, alert, crit, err, warning, notice, info,
debug

$enable_db = 1;              # enable use of BerkeleyDB/libdb (SNMP and
nanny)
$enable_global_cache = 1;    # enable use of libdb-based cache if
$enable_db=1
$nanny_details_level = 2;    # nanny verbosity: 1: traditional, 2: detailed



$sa_tag_level_deflt  = undef;  # add spam info headers if at, or above that
level
$sa_tag2_level_deflt = 2.5;  # add 'spam detected' headers at that level
$sa_kill_level_deflt = 2.5;  # triggers spam evasive actions (e.g. blocks
mail)
$sa_dsn_cutoff_level = 10;   # spam level beyond which a DSN is not sent
# $sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine is
off
$penpals_bonus_score = 8;    # (no effect without a @storage_sql_dsn
database)
$penpals_threshold_high = $sa_kill_level_deflt;  # don't waste time on hi
spam


#$sa_spam_subject_tag = '***SPAM*** ';
$sa_spam_subject_tag = '{Spam?}';
$defang_virus  = 1;  # MIME-wrap passed infected mail
$defang_banned = 1;  # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{+CC_BADH.",3"} = 1;  # NUL or CR character in header
$defang_by_ccat{+CC_BADH.",5"} = 1;  # header line longer than 998
characters
$defang_by_ccat{+CC_BADH.",6"} = 1;  # header field syntax error


 $notify_method  = 'smtp:[127.0.0.1]:10025';
 $forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!

 $final_virus_destiny      = D_DISCARD;
 $final_banned_destiny     = D_BOUNCE;
 $final_spam_destiny       = D_DISCARD;
 $final_bad_header_destiny = D_PASS;
 $bad_header_quarantine_method = undef;


Where have I gone wrong?








-- 
cat /etc/motd

Thank you
Indunil Jayasooriya
http://www.theravadanet.net/
http://www.siyabas.lk/sinhala_how_to_install.html   -  Download Sinhala
Fonts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20160303/9010c385/attachment.html>


More information about the amavis-users mailing list