PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Fetchmail + Amavisd + SpamAssassin + Postfix



ThoKre
29.01.04, 11:47
Hallo,

habe einen Mailserver aufgebaut. Die Mails werden mit fetchmail abgeholt, und durch amavisd auf Viren geprüft. Und dann von postfix an den internen Exchange Server weitergeleitet. Es existieren, also keinen Mailboxen auf dem Server.

Jetzt möchte ich noch Spamassassin mit einbinden, um Spams zu erkennen und zu verwerfen.

Ich habe mich jetzt schon seit 2 Tagen in die Website von Spamassassin eingelesen, aber ich verstehe immer nur Bahnhof.

Ich weiß auch nicht, was ich eigentlich für Dateien erstellen muss, damit alles läuft. Habe die local.cf mir von der Spamassassin - Website erstellen lassen.

Jetzt lese ich aber dauernt etwas von auto_whitelist und user_prefs. Die Dateien zu erstellen ist a kein Problem.

ABER WAS MUSS DA DRIN STEHEN???

Ich bin ein bißchen am verzweifeln.

System: SuSE 8.2
alle Pakete von SuSE installiert. Spamd läuft auch. Virenfilter läuft auch.

core
29.01.04, 12:56
Geh mal nach dieser anleitung vor bis zu Punkt 10:
http://www.geekly.com/entries/archives/00000155.htm

Wenn das soweit klappt, kannst du dich an die Spamassassin Konfiguration (Verwerfen der markierten Mails) machen. :)


Gruss

ThoKre
29.01.04, 14:45
So jetzt verschickt er keine Mails mehr. Die Internetseite hatte ich schon gefunden und ausprobiert. Aber da habe ich dann aufgehört, da immer irgendwelche Fehlermeldungen kamen.

Auszug aus der /var/log/mail:

Jan 29 17:10:29 linux postfix/smtpd[31054]: connect from unknown[10.10.10.10]
Jan 29 17:10:29 linux postfix/smtpd[31054]: 4BA2411DE8: client=unknown[10.10.10.10]
Jan 29 17:10:29 linux postfix/cleanup[31061]: 4BA2411DE8: message-id=<1A28AB7DFA3F5D418A6ED392DD96273D0748@serverexch.wr .local>
Jan 29 17:10:29 linux postfix/qmgr[30586]: 4BA2411DE8: from=<kretzschmar-mobil@waitz-richter.com>, size=646, nrcpt=1 (queue active)
Jan 29 17:10:29 linux postfix/sendmail[31065]: fatal: usage: sendmail [options]
Jan 29 17:10:29 linux postfix/smtpd[31054]: disconnect from unknown[10.10.10.10]
Jan 29 17:10:30 linux spamd[1451]: connection from localhost [127.0.0.1] at port 2689
Jan 29 17:10:31 linux spamd[31070]: info: setuid to spamfilter succeeded
Jan 29 17:10:31 linux spamd[31070]: Creating default_prefs [/home/spamfilter/.spamassassin/user_prefs]
Jan 29 17:10:31 linux spamd[31070]: Created user preferences file: /home/spamfilter/.spamassassin/user_prefs
Jan 29 17:10:32 linux spamd[31070]: processing message <1A28AB7DFA3F5D418A6ED392DD96273D0748@serverexch.wr .local> for spamfilter:500.
Jan 29 17:10:32 linux postfix/qmgr[30586]: warning: connect to transport smtp-amavis: Connection refused
Jan 29 17:10:36 linux spamd[31070]: clean message (0.6/5.0) for spamfilter:500 in 6.0 seconds, 682 bytes.
Jan 29 17:10:37 linux postfix/pipe[31062]: 4BA2411DE8: to=<thokre@freenet.de>, relay=spamfilter, delay=8, status=bounced (command line usage error. Command output: sendmail: invalid option -- - sendmail: fatal: usage: sendmail [options] )
Jan 29 17:10:37 linux postfix/cleanup[31061]: 974D111DED: message-id=<20040129161037.974D111DED@linux.wr.local>
Jan 29 17:10:37 linux postfix/qmgr[30586]: 974D111DED: from=<>, size=2384, nrcpt=1 (queue active)
Jan 29 17:10:38 linux postfix/smtpd[31054]: connect from localhost[127.0.0.1]
Jan 29 17:10:38 linux postfix/smtpd[31054]: D338711DE8: client=localhost[127.0.0.1]
Jan 29 17:10:38 linux postfix/cleanup[31061]: D338711DE8: message-id=<E1AmCrF-0008Tl-00@www10.emo.freenet-rz.de>
Jan 29 17:10:38 linux postfix/qmgr[30586]: D338711DE8: from=<thokre@freenet.de>, size=1980, nrcpt=1 (queue active)
Jan 29 17:10:39 linux postfix/smtp[31097]: 974D111DED: to=<kretzschmar-mobil@waitz-richter.com>, relay=mx00.schlund.de[212.227.126.210], delay=2, status=sent (250 OK id=1AmCrw-0005Da-00)
Jan 29 17:10:39 linux postfix/sendmail[31104]: fatal: usage: sendmail [options]
Jan 29 17:10:39 linux postfix/qmgr[30586]: warning: connect to transport smtp-amavis: Connection refused
Jan 29 17:10:39 linux postfix/smtpd[31054]: disconnect from localhost[127.0.0.1]

Achso und Virenscan geht auch nicht mehr!!!!

core
29.01.04, 18:12
Hier sieht das so aus, wenn fetchmail eine Mail einsammelt:

Jan 29 15:41:06 core fetchmail[23268]: 1 message for xxxxx at mx.freenet.de (6655 octets).
Jan 29 15:41:06 core fetchmail[23268]: reading message xxxxx@mx.freenet.de:1 of 1 (6655 octets)
Jan 29 15:41:06 core postfix/smtpd[23270]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Jan 29 15:41:06 core postfix/smtpd[23270]: connect from localhost[127.0.0.1]
Jan 29 15:41:06 core postfix/smtpd[23270]: 6239485F: client=localhost[127.0.0.1]
Jan 29 15:41:06 core postfix/cleanup[23272]: 6239485F: message-id=<1p8$4v05417372@yxqfuzzog8>
Jan 29 15:41:06 core postfix/qmgr[21774]: 6239485F: from=<Dorcas@dontmesswithtexas.com>, size=6788, nrcpt=1 (queue active)
Jan 29 15:41:06 core fetchmail[23268]: flushed
Jan 29 15:41:06 core spamd[21866]: connection from localhost [127.0.0.1] at port 38900
Jan 29 15:41:06 core spamd[23280]: info: setuid to spamfilter succeeded
Jan 29 15:41:06 core spamd[23280]: processing message <1p8$4v05417372@yxqfuzzog8> for spamfilter:12347.
Jan 29 15:41:06 core spamd[23280]: identified spam (17.7/5.0) for spamfilter:12347 in 0.3 seconds, 6678 bytes.
Jan 29 15:41:06 core postfix/pickup[23234]: C132B861: uid=12347 from=<Dorcas@dontmesswithtexas.com>
Jan 29 15:41:06 core postfix/cleanup[23272]: C132B861: message-id=<1p8$4v05417372@yxqfuzzog8>
Jan 29 15:41:06 core postfix/pipe[23275]: 6239485F: to=<echelon@localhost.tittytwis.ter>, orig_to=<echelon@localhost>, relay=spamfilter, del
ay=0, status=sent (core.tittytwis.ter)
Jan 29 15:41:06 core postfix/qmgr[21774]: C132B861: from=<Dorcas@dontmesswithtexas.com>, size=10911, nrcpt=1 (queue active)
Jan 29 15:41:06 core postfix/local[23281]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Jan 29 15:41:06 core postfix/local[23281]: C132B861: to=<echelon@localhost.tittytwis.ter>, relay=local, delay=0, status=sent ("|IFS=' ' && e
xec /usr/bin/procmail || exit 75 #echelon")



Und so, wenn ich eine Mail verschicke:

Jan 29 14:41:52 core postfix/pickup[22867]: 7BCAF852: uid=1000 from=<xxxxx@arcor.de>
Jan 29 14:41:52 core postfix/cleanup[23126]: 7BCAF852: message-id=<20040129134152.GA23118@core>
Jan 29 14:41:52 core postfix/qmgr[21774]: 7BCAF852: from=<xxxxx@arcor.de>, size=526, nrcpt=1 (queue active)
Jan 29 14:41:53 core postfix/smtp[23128]: 7BCAF852: to=<xxxxx@freenet.de>, relay=mail.arcor-online.net[151.189.21.116], delay=1, st
atus=sent (250 Ok: queued as 940A1754AE4)


Was mir also auffällt, ist, dass bei dir postfix/sendmail aufgerufen wird:
Jan 29 17:10:29 linux postfix/sendmail[31065]: fatal: usage: sendmail [options]

Kann es sein, dass du noch postfix mit sendmail verwendest.. denn das ist praktisch möglich. Hier mal ein Auszug aus dem INSTALL file aus dem postfix Tarball:

1 - Purpose of this document
============================
This document describes how to build, install and configure a
Postfix system so that it can do one of the following:
- Send mail only, without changing an existing sendmail
installation.
- Send and receive mail via a virtual host interface, still
without any change to an existing sendmail installation.
- Replace sendmail altogether.



Gruss

ThoKre
30.01.04, 08:12
Also es ist kein Sendmail installiert.

Die Fehlermeldung kommt sicherlich davon:

/usr/bin/spamc | /usr/sbin/sendmail -i "$@"

Was ja in der postfixfilter steht.

core
30.01.04, 13:36
Nein, das ist _an sich_ normal, weil Postfix aus Kompatibilitätsgründen auch /usr/bin/sendmail hat.


$ cat /usr/bin/postfixfilter
#!/bin/bash
/usr/bin/spamc | /usr/sbin/sendmail -i "$@"
exit $?

$ grep sendmail /var/log/packages/postfix-2.0.18-i386-1
usr/sbin/sendmail
usr/local/man/man1/sendmail.1.gz

man sendmail:
SENDMAIL(1) SENDMAIL(1)

NAME
sendmail - Postfix to Sendmail compatibility interface

ThoKre
30.01.04, 14:04
So damit kann ich jetzt aber wirklich nicht viel anfangen.

Kannst du mir einen genaueren Tip geben?

ThoKre
10.02.04, 09:22
So ich weiß zwar nicht warum aber auf einmal geht es.

Wie konfiguriere ich jetzt Spamassassin, damit es die Spammails nicht an den User leitet?