Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SpamAssassin with very poor results / no spam detection
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Spielmacher
n00b
n00b


Joined: 21 Jul 2005
Posts: 15

PostPosted: Thu Oct 08, 2020 9:02 pm    Post subject: SpamAssassin with very poor results / no spam detection Reply with quote

Hello,

i use a combination of spamasssin, courier-imap and postfix for a couple of years and do updates to the system very regularly. Suddenly my spamassasin isn´t working proper => even the worst spam mails got a very low score and i´m not able to finde the reason.

This example: https://pastebin.com/bgXrfKaQ results in:

Code:
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on netcup
X-Spam-Level: *
X-Spam-Status: No, score=1.2 required=2.5 tests=DKIM_ADSP_NXDOMAIN,
   MISSING_MIME_HB_SEP,NO_DNS_FOR_FROM autolearn=no autolearn_force=no
   version=3.4.4


It should have a score of 15 or more. I would appreciate any help.

Code:
netcup /home/luemmel/testspam # emerge --info mail-filter/spamassassin
python-exec: Invalid impl in /etc/python-exec/python-exec.conf: python3.4
Portage 3.0.4 (python 3.8.5-final-0, default/linux/amd64/17.0, gcc-8.3.0, glibc-2.31-r6, 4.14.149 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.14.149-x86_64-Intel-R-_Xeon-R-_CPU_E5-2620_0_@_2.00GHz-with-glibc2.2.5
KiB Mem:     4054264 total,    142292 free
KiB Swap:    1492988 total,   1488388 free
Timestamp of repository gentoo: Thu, 08 Oct 2020 01:00:01 +0000
Head commit of repository gentoo: d14c094470314538b0449e58b1d4a63791ce3b05
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18-r2::gentoo, 3.5.7::gentoo, 3.6.10-r1::gentoo, 3.8.5::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo, 2.33.1-r1::gentoo, 2.34-r2::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo, 8.3.0-r1::gentoo
sys-devel/gcc-config:     2.3.1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts:

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 apache apache2 berkdb bzip2 cli courier courierauth crypt curl dri exif fam fortran fpm ftp gd gdbm gnutls iconv imap intl json libglvnd libtirpc maildir mmx multilib mysql mysqli ncurses nls nptl openmp pam parcheck pcre pdo phar php postfix readline sasl seccomp soap sockets split-usr sqlite sse sse2 ssl tcpd truetype unicode utf8 vhosts xattr xmlreader xmlrpc xmlwriter xslt zip zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_core authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias cgi dir mime userdir" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python2_7 python3_8" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

mail-filter/spamassassin-3.4.4-r4::gentoo was built with the following:
USE="berkdb mysql sqlite ssl -cron -ipv6 -ldap -libressl -postgres -qmail -test" ABI_X86="(64)"
FEATURES="sandbox pid-sandbox distlocks multilib-strict sfperms binpkg-docompress parallel-fetch strict userfetch fixlafiles binpkg-logs assume-digests unknown-features-warn preserve-libs userpriv config-protect-if-modified network-sandbox ebuild-locks protect-owned unmerge-orphans usersandbox unmerge-logs usersync qa-unresolved-soname-deps ipc-sandbox binpkg-dostrip news merge-sync xattr"

netcup /home/luemmel/testspam #


Code:
netcup ~ # sa-learn --dump magic
0.000          0          3          0  non-token data: bayes db version
0.000          0        633          0  non-token data: nspam
0.000          0          0          0  non-token data: nham
0.000          0      63524          0  non-token data: ntokens
0.000          0 1141759619          0  non-token data: oldest atime
0.000          0 1580305039          0  non-token data: newest atime
0.000          0          0          0  non-token data: last journal sync atime
0.000          0          0          0  non-token data: last expiry atime
0.000          0          0          0  non-token data: last expire atime delta
0.000          0          0          0  non-token data: last expire reduction count


Code:
netcup ~ # spamassassin -D --lint 2>&1 | /bin/grep -i bayes
Oct  8 22:50:44.129 [24524] dbg: plugin: loading Mail::SpamAssassin::Plugin::Bayes from @INC
Oct  8 22:50:44.968 [24524] dbg: config: fixed relative path: /var/lib/spamassassin/3.004004/updates_spamassassin_org/23_bayes.cf
Oct  8 22:50:44.969 [24524] dbg: config: using "/var/lib/spamassassin/3.004004/updates_spamassassin_org/23_bayes.cf" for included file
Oct  8 22:50:44.970 [24524] dbg: config: read file /var/lib/spamassassin/3.004004/updates_spamassassin_org/23_bayes.cf
Oct  8 22:50:45.080 [24524] dbg: config: fixed relative path: /var/lib/spamassassin/3.004004/updates_spamassassin_org/60_bayes_stopwords.cf
Oct  8 22:50:45.080 [24524] dbg: config: using "/var/lib/spamassassin/3.004004/updates_spamassassin_org/60_bayes_stopwords.cf" for included file
Oct  8 22:50:45.081 [24524] dbg: config: read file /var/lib/spamassassin/3.004004/updates_spamassassin_org/60_bayes_stopwords.cf
Oct  8 22:50:46.655 [24524] dbg: plugin: Mail::SpamAssassin::Plugin::Bayes=HASH(0x55978d68fcd8) implements 'learner_new', priority 0
Oct  8 22:50:46.656 [24524] dbg: bayes: learner_new self=Mail::SpamAssassin::Plugin::Bayes=HASH(0x55978d68fcd8), bayes_store_module=Mail::SpamAssassin::BayesStore::DBM
Oct  8 22:50:46.678 [24524] dbg: bayes: learner_new: got store=Mail::SpamAssassin::BayesStore::DBM=HASH(0x55978dfb56b8)
Oct  8 22:50:46.678 [24524] dbg: plugin: Mail::SpamAssassin::Plugin::Bayes=HASH(0x55978d68fcd8) implements 'learner_is_scan_available', priority 0
Oct  8 22:50:46.679 [24524] dbg: bayes: tie-ing to DB file R/O /root/.spamassassin/bayes_toks
Oct  8 22:50:46.681 [24524] dbg: bayes: tie-ing to DB file R/O /root/.spamassassin/bayes_seen
Oct  8 22:50:46.682 [24524] dbg: bayes: found bayes db version 3
Oct  8 22:50:46.683 [24524] dbg: bayes: DB journal sync: last sync: 0
Oct  8 22:50:46.683 [24524] dbg: bayes: not available for scanning, only 0 ham(s) in bayes DB < 200
Oct  8 22:50:46.684 [24524] dbg: bayes: untie-ing
Oct  8 22:50:46.696 [24524] dbg: bayes: tie-ing to DB file R/O /root/.spamassassin/bayes_toks
Oct  8 22:50:46.697 [24524] dbg: bayes: tie-ing to DB file R/O /root/.spamassassin/bayes_seen
Oct  8 22:50:46.697 [24524] dbg: bayes: found bayes db version 3
Oct  8 22:50:46.698 [24524] dbg: bayes: DB journal sync: last sync: 0
Oct  8 22:50:46.698 [24524] dbg: bayes: not available for scanning, only 0 ham(s) in bayes DB < 200
Oct  8 22:50:46.698 [24524] dbg: bayes: untie-ing
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 3007
Location: Edge of marsh USA

PostPosted: Fri Oct 09, 2020 2:54 am    Post subject: Reply with quote

I'm similarly setup on two servers. Not have a problem. sa-update issue?
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Frautoincnam
Guru
Guru


Joined: 19 May 2017
Posts: 331

PostPosted: Sat Oct 10, 2020 4:12 pm    Post subject: Reply with quote

Nothing special in /etc/spamassassin/local.cf or other config file ?

Mine is :
Code:
rewrite_header Subject <<<SPAM>>>
report_safe 0
auto_whitelist_path        /var/lib/spamassassin/auto-whitelist
auto_whitelist_file_mode   0666
bayes_path                 /var/lib/spamassassin/bayes
bayes_file_mode            0666
ok_locales fr
auto_whitelist_factor   0.5
score BAYES_50          0 0 1.800 0.001
score BAYES_60          0 0 3.515 1.0
score BAYES_80          0 0 3.608 2
score BAYES_95          0 0 3.514 3
score BAYES_99          0 0 6 6
score ALL_TRUSTED       -0.5
full ATTACHED_GIF                   /(\r\n|\n)(\r\n|\n)R0lGODlh/
describe ATTACHED_GIF               Fichier .gif en attachement
score ATTACHED_GIF                  4.0
ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
endif # Mail::SpamAssassin::Plugin::Shortcircuit
pyzor_timeout 20

Code:
# sa-learn --dump magic
0.000          0          3          0  non-token data: bayes db version
0.000          0     277556          0  non-token data: nspam
0.000          0     256091          0  non-token data: nham
0.000          0     144546          0  non-token data: ntokens
0.000          0 1599305187          0  non-token data: oldest atime
0.000          0 1602345832          0  non-token data: newest atime
0.000          0 1602345677          0  non-token data: last journal sync atime
0.000          0 1602065366          0  non-token data: last expiry atime
0.000          0    2764800          0  non-token data: last expire atime delta
0.000          0      17424          0  non-token data: last expire reduction count

Code:
/etc/conf.d/spamd
SPAMD_OPTS="--max-children=5 --create-prefs --helper-home-dir -m 5 -c -H -s /var/log/spamd.log"
SPAMD_NICELEVEL=0
SPAMD_TIMEOUT=15
SPAMD_RUN_AS_ROOT=true
Back to top
View user's profile Send private message
Spielmacher
n00b
n00b


Joined: 21 Jul 2005
Posts: 15

PostPosted: Sat Oct 10, 2020 5:28 pm    Post subject: Reply with quote

Code:

/etc/spamassassin/local.cf
report_safe 0
required_score 2.5
use_bayes 1
bayes_auto_learn 1
ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
endif # Mail::SpamAssassin::Plugin::Shortcircuit



Code:

/etc/cron.daily/sa-update
/usr/bin/sa-update
/usr/bin/sa-learn --spam /home/luemmel/.maildir/.Junk/cur/
/usr/bin/sa-compile
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum