Page 1 of 1

Großes Problem mit Spamassassin!

Posted: 2005-11-12 11:07
by d@tenmaulwurf
Hi!

Habe Spamassassin in Kombination mit Pstfix und MySQL als Backend erfolgreich am laufen.


Nur auf einmal kamen Spams ungehindert durch. Ich suchte nach der Ursache und fand einige unschöne Phänomene:
Nov 12 00:04:46 amy spamc[26444]: connect(AF_INET) to spamd at 127.0.0.1 failed, retrying (#1 of 3): Connection refused
Nov 12 00:04:47 amy spamc[26444]: connect(AF_INET) to spamd at 127.0.0.1 failed, retrying (#2 of 3): Connection refused
Nov 12 00:04:48 amy spamc[26444]: connect(AF_INET) to spamd at 127.0.0.1 failed, retrying (#3 of 3): Connection refused
Nov 12 00:04:49 amy spamc[26444]: connection attempt to spamd aborted after 3 retries
in /var/log/mail.err

Postfix / Spamc können scheinbar keine Mails mehr dem spamd übergeben - warum weiß ich nicht.
Ein Restart des Spamd's brachte auch nichts.

Habe den spamd mal im Debug gestartet - leider nichts brauchbares.

Hier ein ps-fax-Teilausschnitt:
5105 ? SNs 0:00 /usr/bin/perl -T -w /usr/sbin/spamd --port 8965 --create-prefs --max-children 5 -q -x -u vmail --debug -d --pidfile=/var/run/spamd/spamd.pid
5110 ? SN 0:03 _ spamd child
5111 ? SN 0:03 _ spamd child
5112 ? SN 0:04 _ spamd child
5113 ? SN 0:03 _ spamd child
5114 ? SN 0:03 _ spamd child
5228 ? Ss 0:00 /usr/lib/postfix/master
5235 ? S 0:00 _ pickup -l -t fifo -u -c
5236 ? S 0:00 _ qmgr -l -t fifo -u -c
5237 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5238 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5242 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5247 ? S 0:00 _ cleanup -z -t unix -u -c
5248 ? S 0:00 _ trivial-rewrite -n rewrite -t unix -u -c
5249 ? S 0:00 _ virtual -t unix
5255 ? S 0:00 _ smtpd -n smtp -t inet -u -c -o content_filter spamassassin
5256 ? S 0:00 _ proxymap -t unix -u
5261 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5263 ? S 0:00 _ smtpd -n smtp -t inet -u -c -o content_filter spamassassin
5264 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5273 ? S 0:00 _ cleanup -z -t unix -u -c
5280 ? S 0:00 _ cleanup -z -t unix -u -c
5310 ? S 0:00 _ smtpd -n smtp -t inet -u -c -o content_filter spamassassin
5326 ? S 0:00 _ smtpd -n smtp -t inet -u -c -o content_filter spamassassin
5343 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5349 ? S 0:00 _ smtpd -n smtp -t inet -u -c -o content_filter spamassassin
5352 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5359 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5386 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5394 ? S 0:00 _ smtpd -n smtp -t inet -u -c -o content_filter spamassassin
5410 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5420 ? S 0:00 _ virtual -t unix
5456 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5462 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5464 ? S 0:00 _ pipe -n spamassassin -t unix user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
5553 ? S 0:00 _ smtpd -n smtp -t inet -u -c -o content_filter spamassassin
Die Mails hängen da in der Postfix-Queue, da spamd sie scheinbar nicht annimmt.

Beim Aufruf von "mailq" findet man dann solche schönen Sachen hier:
DCE1418E5AFC 2295 Sat Nov 12 10:44:17 user@domain.tld
(Command died with signal 15: "/usr/bin/spamc")
user@domain.tld
Hier der relevante Teil der master.cf (obwohl es ja ohne Probleme bis gestern Nacht funktionierte):
smtp inet n - - - - smtpd
-o content_filter=spamassassin
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - - 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
#smtp unix - n n - - pipe
spamassassin unix - n n - - pipe
user=nobody argv=/usr/bin/spamc -p 8965 -u ${recipient} -f -e
/usr/sbin/sendmail -oi -f ${sender} ${recipient}
relay unix - - - - - smtp
Ich hoffe ihr könnt mir helfen, bin wirklich ratlos!

Vielen, vielen Danl schonmal im voraus,

d@tenmaulwurf

Re: Großes Problem mit Spamassassin!

Posted: 2005-11-12 12:09
by Roger Wilco
Poste die Ausgabe von `netstat -tulpen|grep spam` und deine spamd Konfiguration (z. B. welche Parameter du beim Start übergibst).

Re: Großes Problem mit Spamassassin!

Posted: 2005-11-12 12:47
by d@tenmaulwurf
/etc/default/spamassassin:

OPTIONS="--port 8965 --create-prefs --max-children 5 -q -x -u vmail --debug"

ENABLED ist natürlich auf 1 gesetzt.


Den netstat poste ich nacher oder heute abend/nacht, wo weniger Mailverkehr ist. habe den Spamfilter erstmal ausgeschaltet, damit die Mails sofort ausgeliefert werden.

Zudem geht der Serevr leicht in die Knie, wenn bei JEDER Spam 3 versucht wird, den spamd zu kontaktieren.

Vielen Dank erstmal!

Schönes Wochenende!

d@tenmaulwurf

Re: Großes Problem mit Spamassassin!

Posted: 2005-11-12 13:56
by Joe User
Schuss ins Blaue: Spamassassin kann sich nicht mit MySQL verbinden...

Re: Großes Problem mit Spamassassin!

Posted: 2005-11-12 17:27
by d@tenmaulwurf
Wenn ich sage ich hab den Debug-Modus aktiviert, dann heißt das auch ich hab mir die Ausgaben angeguckt :)

Nein, nur Erfolgsmeldungen in den Logs (auch verbindungen mit MySQL).

Danke trotzdem ;)

Re: Großes Problem mit Spamassassin!

Posted: 2005-11-15 07:11
by d@tenmaulwurf
# netstat -a | grep 8965
tcp 0 0 localhost:8965 *:* LISTEN


bzw.


# netstat -tuplen | grep 8965
tcp 0 0 127.0.0.1:8965 0.0.0.0:* LISTEN 0 1119681 640/perl