• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

X-Spam-Flag wird nicht immer gesetzt

Status
Für weitere Antworten geschlossen.

BiZNiZ

Member
So langsam blicke ich gar nichts mehr ...

Jetzt arbeitet der SpamFilter anscheinend wieder, kennzeichnet aber nicht alle Mails mit dem X-Spam-Flag und somit werden die Mails auch nicht über das SIEVE-Script in den Ordner Spam verschoben ...

Kommen sich hier Amavis und SpamAssassin irgendwie ins Gehege?

Hier mal der Quelltext einer Mail, die laut body als SPAM erkannt wurde (Points >= 3), aber laut Quelltext nur HITS= -3.7 hat :

Code:
Return-Path:	<isjnemnxmilhjpcw@amuro.net>
Received:	from ox5.vhs-heidekreis.de ([unix socket]) by ox5 (Cyrus v2.2.3) with LMTP; Tue, 28 Feb 2006 23:38:19 +0100
X-Sieve:	CMU Sieve 2.2
Received:	from localhost (localhost [127.0.0.1]) by ox5.vhs-heidekreis.de (Postfix) with ESMTP id 3401F1A489 for <rpatzke@ox5.vhs-heidekreis.de>; Tue, 28 Feb 2006 23:38:19 +0100 (CET)
Received:	from ox5.vhs-heidekreis.de ([127.0.0.1]) by localhost (ox5 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17431-08 for <rpatzke@ox5.vhs-heidekreis.de>; Tue, 28 Feb 2006 23:38:13 +0100 (CET)
Received:	by ox5.vhs-heidekreis.de (Postfix, from userid 65534) id 37ECC1A487; Tue, 28 Feb 2006 23:38:13 +0100 (CET)
Received:	from localhost by ox5.vhs-heidekreis.de with SpamAssassin (2.64 2004-01-11); Tue, 28 Feb 2006 23:38:13 +0100
From:	"Weaver Vasquez" <isjnemnxmilhjpcw@amuro.net>
To:	<rpatzke@vhs-heidekreis.de>
Subject:	dqfAH save up to 70% on the meds you need! Dckxvbsyqbuzrpawk
Date:	Tue, 28 Feb 2006 23:40:38 +0200
Message-Id:	<13339887737138108.20060228234038@basti.mshome.net>
MIME-Version:	1.0
Content-Type:	multipart/mixed; boundary="----------=_4404D0D5.2106DD84"
X-Virus-Scanned:	by amavisd-new at vhs-heidekreis.de
X-Spam-Status:	No, hits=-3.7 tagged_above=-99.0 required=3.0 tests=BAYES_00, DNS_FROM_RFCI_DSN, HTML_FONTCOLOR_RED, HTML_FONTCOLOR_UNSAFE, HTML_FONT_INVISIBLE, HTML_MESSAGE
X-Spam-Level:	
This is a multi-part message in MIME format.

------------=_4404D0D5.2106DD84
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Spam detection software, running on the system "ox5.vhs-heidekreis.de", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or block
similar future email. If you have any questions, see
the administrator of that system for details.

Content preview: fsuimmvgyx zaonar sdxcgq dtiog piwrjs qlyuturd
xlbnzwoerpj afnpsn unijx sajtlaq ruvvccvh URI:http://www.scytheem.com/
URI:cid:bfrdtgdmitscfxgtgnylsdhu wggbas fokk tbyojlicbg xdcywvlqreg
xrlle unndkz wopza xaepbxpndax urfuaa [...]

Content analysis details: (13.6 points, 3.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
1.5 RCVD_NUMERIC_HELO Received: contains a numeric HELO
0.9 HTML_40_50 BODY: Message is 40% to 50% HTML
0.1 HTML_MESSAGE BODY: HTML included in message
0.1 HTML_FONTCOLOR_UNSAFE BODY: HTML font color not in safe 6x6x6 palette
5.4 BAYES_99 BODY: Bayesian spam probability is 99 to 100%
[score: 0.9998]
0.2 MIME_HTML_ONLY BODY: Message only has text/html MIME parts
1.0 HTML_FONT_INVISIBLE BODY: HTML font color is same as background
0.1 HTML_FONTCOLOR_RED BODY: HTML font color is red
1.1 HTML_IMAGE_ONLY_04 BODY: HTML: images with 200-400 bytes of words
0.0 MIME_BOUND_NEXTPART Spam tool pattern in MIME boundary
3.1 FORGED_MUA_OUTLOOK Forged mail pretending to be from MS Outlook

The original message was not completely plain text, and may be unsafe to
open with some email clients; in particular, it may contain a virus,
or confirm that your address can receive spam. If you wish to view
it, it may be safer to save it to a file and open it with an editor.


------------=_4404D0D5.2106DD84
Content-Type: message/rfc822; x-spam-type=original
Content-Description: original message before SpamAssassin
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit

Received: from joey1 (dialin-see-080-228-41-124.ewetel.net [80.228.41.124])
by ox5.vhs-heidekreis.de (Postfix) with SMTP id C881A1A46E
for <rpatzke@vhs-heidekreis.de>; Tue, 28 Feb 2006 23:38:07 +0100 (CET)
Received: from 111.235.122.247 ([1] helo=131.138.114.136)
by 138.247.248.223 with esmtp ( 3.35 #1 ())
id 630Ifz-2574An-86
for rpatzke@vhs-heidekreis.de; Tue, 28 Feb 2006 23:40:38 +0200
From: "Weaver Vasquez" <isjnemnxmilhjpcw@amuro.net>
To: <rpatzke@vhs-heidekreis.de>
Subject: dqfAH save up to 70% on the meds you need! Dckxvbsyqbuzrpawk
Date: Tue, 28 Feb 2006 23:40:38 +0200
Message-ID: <13339887737138108.20060228234038@basti.mshome.net>
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
MIME-Version: 1.0
Content-Type: multipart/related; boundary="----=_NextPart_ehzpnzoepzybvprkzeukowan"

This is a multi-part message in MIME format.

Wie kommt diese unterschiedliche "Punktzuweisung" zustande? Einmal SpamAssassin und einmal Amavis?

Die Points im BODY sind ja OK, aber die HITS=-3.7 ?!?!?

In der Hoffnung, dass jemand einen Lösungsansatz kennt, verbleibe ich vorerst ...

Danke ...
 
OP
B

BiZNiZ

Member
Bei unserem Open-Xchange 5 (auf SLES9) wird durch einen Klick in der Admin-Oberfläche auf "Spam-Filter aktivieren" der SpamAssassin als content-filter in die master.cf aufgenommen. Amavis als Virenscanner wird über die main.cf und die master.cf ebenfalls aufgenommen.

master.cf:
Code:
==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd -o content_filter=spamassassin
#smtps	  inet	n	-	n	-	-	smtpd -o smtpd_tls_wrappermode=yes
#  -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission	inet	n	-	n	-	-	smtpd
#  -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628	  inet	n	-	n	-	-	qmqpd
pickup	  fifo	n	-	n	60	1	pickup
cleanup	  unix	n	-	n	-	0	cleanup
qmgr	  fifo	n	-	n	300	1	qmgr
#qmgr	  fifo	n	-	n	300	1	nqmgr
#tlsmgr   fifo  -       -       n       300     1       tlsmgr
rewrite	  unix	-	-	n	-	-	trivial-rewrite
bounce	  unix	-	-	n	-	0	bounce
defer	  unix	-	-	n	-	0	bounce
flush	  unix	n	-	n	1000?	0	flush
proxymap  unix	-	-	n	-	-	proxymap
smtp	  unix	-	-	n	-	-	smtp
relay	  unix	-	-	n	-	-	smtp
#	-o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix	n	-	n	-	-	showq
error     unix	-	-	n	-	-	error
local	  unix	-	n	n	-	-	local
virtual	  unix	-	n	n	-	-	virtual
lmtp	  unix	-	-	n	-	-	lmtp
#localhost:10025 inet	n	-	n	-	-	smtpd -o content_filter=
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus	  unix	-	n	n	-	-	pipe
  user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp	  unix	-	n	n	-	-	pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
vscan     unix  -       n       n       -       10       pipe
  user=vscan argv=/usr/sbin/amavis ${sender} ${recipient}
procmail  unix  -       n       n       -       -       pipe
  flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}

###### SPAMASSASIN #####
spamassassin unix  -       n       n       -       -       pipe user=nobody argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
smtp-amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -o disable_dns_lookups=yes
127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000

main.cf:

Code:
...
mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
content_filter = smtp-amavis:[127.0.0.1]:10024
...

Unsere mails machen jetzt folgen Weg, wenn ich das richtig sehe:

Postfix -> SpamAssassin -> Postfix -> Amavis-VScan -> Amavis-SpamAssassin -> Postfix

Der erste Durchlauf im SpamAssassin erkennt die Mail korrekt als SPAM und setzt die entsprechenden Header-Einträge.

Der zweite Durchlauf in Amavis geht durch den Virenscanner und dann erneut an den SpamAssassin, wobei zuvor die bestehenden Header-Einträge des ersten erfolgreichen durchlaufes entsorgt werden.

amavisd.conf:

Code:
#$remove_existing_spam_headers = 0;     # leave existing X-Spam* headers alone
$remove_existing_spam_headers  = 1;     # remove existing spam headers if
					# spam scanning is enabled (default)

Dieser zweite Durchlauf kommt zu einem völlig anderen Spam-Ergebnis, dass meistens unter 0 liegt.

Amavis wendet also entweder andere Filterregeln an, oder greift auf eine andere Bayes-DB zurück ...

Vorerst habe ich mich nun dazu entschlossen, Amavis die Spam-Überprüfung komplett zu entziehen, indem ich in der amavisd.conf den folgenden Eintrag auskommentiert habe:

Code:
# @bypass_spam_checks_acl  = qw( . );  # uncomment to DISABLE anti-spam code

Das kann aber irgendwie nicht die Lösung sein, denke ich ...

Es weiß nicht zufällig jemand, wie ich Amavis richtig einstellen kann, so dass Spam von amavis genauso korrekt gefiltert wird?
 
Status
Für weitere Antworten geschlossen.
Oben