SpamAssassin konfigurieren

SpamAssassin kann Email-Spam identifizieren und die Betreffszeilen der betroffenen Mails ändern (standardmäßig: ****SPAM(SCORE)****). Das Löschen von Spam-Nachrichten bleibt SpamAssassin jedoch vorbehalten.

Wer trotzdem so viel Spam wie möglich erkennen möchte, kann die Konfigurationsdatei von SpamAssassin (zu finden unter /etc/mail/spamassassin/local.cf) etwas optimieren. Um die Konfigurationsdatei nach Veränderung zu laden, muss SpamAssassin erst gestoppt
/etc/init.d/spamd stop und dann wieder gestartet /etc/init.d/spamd start werden.

Meine Konfiguration:

# Add your own customisations to this file.  See ‚man Mail::SpamAssassin::Conf‘
# for details of what can be tweaked.
#
# SpamAssassin config file for version 3.x
# NOTE: NOT COMPATIBLE WITH VERSIONS 2.5 or 2.6
# See http://www.yrex.com/spam/spamconfig25.php for earlier versions
# Generated by http://www.yrex.com/spam/spamconfig.php (version 1.50)

# How many hits before a message is considered spam.
required_score           5.0

# Change the subject of suspected spam
rewrite_header subject         *****GOAWAY*****

# Encapsulate spam in an attachment (0=no, 1=yes, 2=safe)
report_safe             1

# Enable the Bayes system
use_bayes               1

# Enable Bayes auto-learning
bayes_auto_learn     1

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

# Mail using languages used in these country codes will not be marked
# as being possibly spam in a foreign language.
# – german
ok_languages            de

# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_locales              all

# Enhance the uridnsbl_skip_domain list with some usefull entries
# Do not block the web-sites of Novell and SUSE
ifplugin Mail::SpamAssassin::Plugin::URIDNSBL
uridnsbl_skip_domain suse.de opensuse.org suse.com suse.org
uridnsbl_skip_domain novell.com novell.org novell.ru novell.de novell.hu novell.co.uk
endif   # Mail::SpamAssassin::Plugin::URIDNSBL

#The combination of SpamAssassin + The Bat! as mail client can cause false positives.
#The reason for the high spam rating is the Reply-To header inserted by mailman,
#which seems to have more quoting than The Bat! can do.
#If you have such problem activate the next two lines
#header IS_MAILMAN exists:X-Mailman-Version
#score IS_MAILMAN -2

Alle Emails werden jetzt nach bestimmten Filtern gewichtet und beim Überschreiten einer Trefferpunktzahl von 5.0 in der Betreffszeile mit *****GOAWAY***** markiert. In der Online-Dokumentation von SpamAssassin ist beschrieben, wie man Spammails komplett löschen kann. Dabei ist das Verfahren abhängig vom verwendeten Mailserver.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.