Spamassassin - Config verbessern

LionBit

Member
Hallo Forum,

ich habe bei Strato einen V-Power Server mit Debian Etch, Plesk und Spamassassin mit Qsheff, also Qmail als MTA.

Seit jahren quähle ich mich mit den Spam herum der trotz SA ungehindert durchkommt und möchte euch mal um etwas Hilfe bitten.

Meine /var/qmail/.spamassassin/user_prefs sieht bisher so aus:
Code:
ifplugin Mail::SpamAssassin::Plugin::URIDNSBL
uridnsbl_skip_domain localhost
uridnsbl_skip_domain aol.com aol.de
uridnsbl_skip_domain aim.com aim.de
uridnsbl_skip_domain t-online.de
uridnsbl_skip_domain momail.de
uridnsbl_skip_domain se-world.info
endif

#########################################

# Whitelist and blacklist addresses are now file-glob-style patterns, so
# "friend@somewhere.com", "*@isp.com", or "*.domain.net" will all work.
whitelist_from	*@viele_einträge_bekannter_domains

#########################################

# Add your own customised scores for some tests below.  The default scores are
# read from the installed spamassassin rules files, but you can override them
# here.  To see the list of tests and their default scores, go to
# http://spamassassin.apache.org/tests.html .
#
#########################################
# scrore 
#########################################
score USER_IN_WHITELIST -100.0
score ALL_TRUSTED -1.360
score SUBJECT_PILLCHEN 4.0
score SUBJECT_PENIS 4.0
score SUBJECT_AUTOPILOT 4.0
score SUBJECT_IMPOTENZ 4.0
score SUBJECT_CASINO 4.0
score SUBJECT_DRUG_GAP_C 4.0
score SUBJECT_DRUG_GAP_L 4.0
score SUBJECT_DRUG_GAP_P 4.0
score SUBJECT_DRUG_GAP_S 4.0
score SUBJECT_DRUG_GAP_VA 4.0
score SUBJECT_DRUG_GAP_VIC 4.0
score SUBJECT_DRUG_GAP_X 4.0
score ONLINE_PHARMACY 5.0
score PYZOR_CHECK 4.0
score RAZOR2_CHECK 4.0
score DRUG_DOSAGE 4.0
score DRUG_ED_CAPS 4.0
score VIA_GAP_GRA 4.0
score DATE_IN_PAST_06_12 5.0
score CLICK_TO_REMOVE_1 4.0
score GUARANTEED_100_PERCENT 4.0
score IMPOTENCE 10.0
score MORE_SEX 10.0
score MALE_ENHANCE 10.0
score REPLICA_WATCH 10.0
score FUZZY_CPILL 4.0
score FUZZY_MEDICATION 4.0
score FUZZY_PHARMACY 4.0
score FUZZY_SOFTWARE 4.0
score FUZZY_VPILL 4.0
score FUZZY_XPILL 4.0
#########################################
# scrore http://tlec.linux.or.jp/docs/user_prefs
#########################################
score INVALID_DATE 5.4

score BAYES_80 6.0
score BAYES_95 7.0
score BAYES_99 7.5

score BAYES_00 0 0 -1.665 -6.0
score BAYES_05 0 0 -0.925 -4.0

score X_LIBRARY 4.3
score HTML_70_80 1.0
score UPPERCASE_25_50 0.5

score NO_DNS_FOR_FROM 3.5

score HOT_NASTY 5.0
score RISK_FREE 5.0
score RATWARE_OE_MALFORMED 4.1
score UPPERCASE_75_100 1.0

score HTML_MESSAGE 1.0

score MSGID_FROM_MTA_ID 2.7

score GAPPY_SUBJECT 0.5

#########################################

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

#########################################

# Change the subject of suspected spam
rewrite_header	subject *****SPAM***** (_SCORE_)

#########################################

# 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
use_bayes_rules               1
bayes_auto_learn              1

#########################################

# Enable or disable network checks
skip_rbl_checks       0
use_razor2             1
use_dcc                 1
use_pyzor              1
rbl_timeout            15
dns_available         test

#########################################

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

Das Problem bei dieser Config sind meine Einträge zur "Whitelist" denn viele Spamer verwenden meine Domain in ihren Headern und die Mails kommen wegen USER_IN_WHITELIST problemlos durch.

Kann man das irgend wie umgehen?

Noch ein Problem das ich nicht verstehe...
In der Config soll SA Lernen aber im Report und den Logs steht immer "autoearn no".
Dabei kann SCORE auch mal 100 Punkte haben! Das ist dem SA anscheinend egal.
Hier ein kleiner Auszug aus /var/log/mail.info:
Code:
Oct  8 12:09:44 h791208 spamd[5642]: spamd: result: Y 4 - BAYES_05,FROM_LOCAL_NOVOWEL,HELO_DYNAMIC_IPADDR2,HTML_70_80,HTML_MESSAGE scantime=0.4,size=1526,user=qmaild,uid=2020,required_score=3.0,rhost=xxxxxx.serverkompetenz.net,raddr=127.0.0.1,rport=36378,mid=<000701c9292d$079a3cf8$f9520480@bvfhlkl>,bayes=0.0329714090587178,autolearn=no
 
Hallo,
meine Einträge zur "Whitelist" denn viele Spamer verwenden meine Domain in ihren Headern und die Mails kommen wegen USER_IN_WHITELIST problemlos durch.
Also ich schreib in die Whitelist nur "ausgesuchte" Absender mit kompletter Mailadresse und nicht "Domainweit", das erscheint mir auch sinvoller und hat sich bewährt :) Das Prinzip ist doch, dass man Whiteliste nur für diejenigen macht, die oft falsch als Spam erkannt wurden und nicht für den ganzen Rest!
 
Hallo,
ja, das klingt logisch. Das habe ich jetzt geändert. Danke für den Tip :)

Das andere Problem mit der Bayes besteht aber noch immer. SA will nicht lernen und lässt immer wieder eine Menge Spam durch.

Ich habe noch ein wenig mit der "/var/qmail/.spamassassin/user_prefs" gespielt da anscheinend diese genutzt wird und nicht die "/etc/spamassassin/local.cf"

In der /var/log/mail.info stehen solche Einträge wie:
Code:
Oct  9 10:44:18 h791208 spamd[16199]: spamd: connection from h791208.serverkompetenz.net [127.0.0.1] at port 42256 
Oct  9 10:44:18 h791208 spamd[16199]: spamd: setuid to qmaild succeeded 
Oct  9 10:44:18 h791208 spamd[16199]: config: not parsing, administrator setting: bayes_path /var/qmail/.spamassassin/ 
Oct  9 10:44:18 h791208 spamd[16199]: config: failed to parse line, skipping: bayes_path /var/qmail/.spamassassin/ 
Oct  9 10:44:18 h791208 spamd[16199]: config: not parsing, administrator setting: bayes_file_mode 777 
Oct  9 10:44:18 h791208 spamd[16199]: config: failed to parse line, skipping: bayes_file_mode 777 
Oct  9 10:44:18 h791208 spamd[16199]: config: failed to parse line, skipping: use_dcc 1 
Oct  9 10:44:18 h791208 spamd[16199]: config: not parsing, administrator setting: auto_whitelist_path /var/qmail/.spamassassin/auto-whitelist 
Oct  9 10:44:18 h791208 spamd[16199]: config: failed to parse line, skipping: auto_whitelist_path /var/qmail/.spamassassin/auto-whitelist 
Oct  9 10:44:18 h791208 spamd[16199]: config: not parsing, administrator setting: user_scores_dsn 
Oct  9 10:44:18 h791208 spamd[16199]: config: failed to parse line, skipping: user_scores_dsn 
Oct  9 10:44:18 h791208 spamd[16199]: spamd: processing message <000901c929eb$059b29ec$584579aa@wbtjnda> for qmaild:2020 
Oct  9 10:44:23 h791208 spamd[16199]: spamd: identified spam (8.0/3.0) for qmaild:2020 in 5.3 seconds, 1195 bytes. 
Oct  9 10:44:23 h791208 spamd[16199]: spamd: result: Y 7 - BAYES_95,PRICES_ARE_AFFORDABLE scantime=5.3,size=1195,user=qmaild,uid=2020,required_score=3.0,rhost=h791208.serverkompetenz.net,raddr=127.0.0.1,rport=42256,mid=<000901c929eb$059b29ec$584579aa@wbtjnda>,bayes=0.987456065395515,autolearn=no

Die 3 Punkte sind ja überschritten worden, trotzdem kam diese Spam ungehindert durch. Ich verstehe das nicht mehr...
Ok, diese neuen Einträge werden in den Logs "angemäckert" aber ich weiß nicht mehr was ich tun soll damit SA die Bayes-DB wieder nutzen soll.
 
Morgen,
Die 3 Punkte sind ja überschritten worden, trotzdem kam diese Spam ungehindert durch. Ich verstehe das nicht mehr...

Der SA filtert nicht raus, er markiert "nur" , das Filtern mußt du schon mit z.B. procmail oder auf dem client im Mailprogramm machen.

Gruss Alex
 
Ok, filtern war nicht das richtige Wort dafür, sorry.
Das ist mir auch bewusst.
Mir geht es eigentlich um das Lernen...
Ich habe das Verzeichnis /var/qmail/.spamassassin umbenannt damit SA es neu anlegen kann und einfach mal von vorne anfangen kann. Dabei habe ich die user_prefs unangetastet gelassen. (es ist alles auskommentiert)
Die Dateien bayes_journal, bayes_seen und bayes_toks habe ich wieder in das vom SA frisch angelegte Verzeichnis kopiert und warte jetzt ab wie sich das alles jetzt verhält.
 
Back
Top