Ist mein spamassassin überhaupt wirksam?

Krischu

New Member
Seit Dezember etwa beobachte ich sehr starkes Spamaufkommen und meine bis dahin laufende Einstellung von Postfix, Spamassasin (Amavis?) und Dovecot schien zu funktionieren. Ich fand auch hin und wieder mit SPAM markierte Subject lines in EMails. Die scheibnen jetzt ganz verschwunden zu sein. Weiß jetzt nicht, ob das an Konfigurationsänderungen lag. Jedenfalls landen täglich 100 Emails größtenteils des selben Musters (Betriebshaftpflicht, PKV, und zweifelhafte Angebote gewisser Damen, die sich zwar verführerisch anhören, aber für den Müll sind) :)

Kurz und gut, ich verschiebe die in Thunderbird immer in den Junk-Folder und lasse einen cron-Job alle 1/4 h über den dovecot-Folder laufen mit einem
sa-learn

Code:
*/15 * * * * /root/move_junk.sh
0 5 * * 0 sa-update >/dev/null 2>&1
0 6 * * 0 sa-compile >/dev/null 2>&1


Code:
move_junk.sh
DJUNK=/var/mail/mydomain/me/mail/Junk/cur
DSALEARN=/var/spool/salearn
mv $DJUNK/*,S* $DSLEARN
/usr/bin/sa-learn --spam $DSALEARN
rm $DSALEARN/*

Das ganze ist lästig und bringt auch keinen Fortschritt.
Hier ist mal meine local.cf aus /etc/spamassassin:

Code:
# 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


#   Set which networks or hosts are considered 'trusted' by your mail
#   server (i.e. not spammers)
#
# trusted_networks 212.17.35.


#   Set file-locking method (flock is not safe over NFS, but is faster)
#
# lock_method flock


#   Set the threshold at which a message is considered spam (default: 5.0)
#
# required_score 5.0

loadplugin Mail::SpamAssassin::Plugin::DCC

#   Use Bayesian classifier (default: 1)
#
# use_bayes 1


#   Bayesian classifier auto-learning (default: 1)
#
# bayes_auto_learn 1


#   Set headers which may provide inappropriate cues to the Bayesian
#   classifier
#
# bayes_ignore_header X-Bogosity
# bayes_ignore_header X-Spam-Flag
# bayes_ignore_header X-Spam-Status
# +++ CPK

rewrite_header Subject [***** SPAM _SCORE_ *****]
required_score           2.0
#to be able to use _SCORE_ we need report_safe set to 0
#If this option is set to 0, incoming spam is only modified by adding some "X-Spam-" headers and no changes will be made to the body.
report_safe     0

# Enable the Bayes system
use_bayes               1
use_bayes_rules         1
# Enable Bayes auto-learning
bayes_auto_learn        1

# Enable or disable network checks
skip_rbl_checks         0
use_razor2              0
use_dcc                 0
use_pyzor               0

ok_languages en de
ok_locales en

# --- CPK


#   Some shortcircuiting, if the plugin is enabled
#
ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
#
#   default: strongly-whitelisted mails are *really* whitelisted now, if the
#   shortcircuiting plugin is active, causing early exit to save CPU load.
#   Uncomment to turn this on
#
# shortcircuit USER_IN_WHITELIST       on
# shortcircuit USER_IN_DEF_WHITELIST   on
# shortcircuit USER_IN_ALL_SPAM_TO     on
# shortcircuit SUBJECT_IN_WHITELIST    on

#   the opposite; blacklisted mails can also save CPU
#
# shortcircuit USER_IN_BLACKLIST       on
# shortcircuit USER_IN_BLACKLIST_TO    on
# shortcircuit SUBJECT_IN_BLACKLIST    on

#   if you have taken the time to correctly specify your "trusted_networks",
#   this is another good way to save CPU
#
# shortcircuit ALL_TRUSTED             on

#   and a well-trained bayes DB can save running rules, too
#
# shortcircuit BAYES_99                spam
# shortcircuit BAYES_00                ham

endif # Mail::SpamAssassin::Plugin::Shortcircuit

Zuletzt hatte ich noch
ok_languages en de
ok_locales en

hinzugefügt, aber trotzdem kommt auch immer wieder ein Spam in Hebräisch durch, der mir Immobilien verkaufen will, so meint Google Übersetzer.

Wie kann ich meine ganze Konfiguration mal testen?

Ich kann noch folgende Beobachtung hinzufügen:

Eine Email, die ich von meinem icloud_Konto mit dem Text

https://www.etes.de/downloads/spamassassin/

verschickt hatte, kam glatt durch und landete unbeanstandet in meiner INBOX. Mit Datum 24.8.2014 (!)

Mir fällt auch auf, daß /var/lib/spamassassin/spamd.log am 5.2.2017 endet.
Das war wohl der Tag, an dem ich gefühlt mit meinem bayes-Anlern-Filter Erfolg hatte und danach dann nicht mehr.

Ich stelle aber auch fest, daß spamd aktuell nicht in der ps-Liste auftaucht. Wird der nur bei Email-Eingang kurz gestartet? OK, ich sehe, der wird geforkt.

Aber jetzt stelle ich gerade fest: es gibt einen user debian-spamd und einen user spamd.
Beide haben das Homeverzeichnis /var/lib/spamassassin.
spamd hat /sbin/nologin als login shell, debian-spamd aber hat /bin/sh (!). Wieso das?
 
Zuletzt bearbeitet:

Werbung

Top