[Postfixbuch-users] Spamassassin / Clamd / Amavis

Jan Dinger jan.dinger at arcor.de
Di Aug 1 11:30:54 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Ich will einen SPAM-Filter und einen Virusscanner für meine E-Mails
einbauen, jedoch erhalte ich in meiner Log-File eine Warung:

Aug  1 11:17:01 h969352 amavis[31588]: (31588-01) (!!) WARN: all
primary virus scanners failed, considering backups

Clamd ist installiert und läuft auch. Und in der Config ist er
eigentlich auch richtig eingerichtet (wie in der doku beschrieben)

 ### http://www.clamav.net/
 ['ClamAV-clamd',
   \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
   qr/\bOK$/, qr/\bFOUND$/,
   qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
 # NOTE: remember to add the clamav user to the amavis group, and
 # to properly set clamd to init supplementary groups
 # When running chrooted one may prefer: ["CONTSCAN
{}\n","$MYHOME/clamd"],


Genau so steht es bei mir drinne.

So dann habe ich das nächste Problem, Spamassassin:

Wenn ich amavis starte, wird alles eingeladen was ich will.

Aug  1 11:14:50 h969352 amavis[31586]: Amavis::DB code      loaded
Aug  1 11:14:50 h969352 amavis[31586]: Amavis::Cache code   loaded
Aug  1 11:14:50 h969352 amavis[31586]: SQL base code        loaded
Aug  1 11:14:50 h969352 amavis[31586]: SQL::Log code        NOT loaded
Aug  1 11:14:50 h969352 amavis[31586]: SQL::Quarantine      NOT loaded
Aug  1 11:14:50 h969352 amavis[31586]: Lookup::SQL code     loaded
Aug  1 11:14:50 h969352 amavis[31586]: Lookup::LDAP code    NOT loaded
Aug  1 11:14:50 h969352 amavis[31586]: AM.PDP-in proto code loaded
Aug  1 11:14:50 h969352 amavis[31586]: SMTP-in proto code   loaded
Aug  1 11:14:50 h969352 amavis[31586]: Courier proto code   NOT loaded
Aug  1 11:14:50 h969352 amavis[31586]: SMTP-out proto code  loaded
Aug  1 11:14:50 h969352 amavis[31586]: Pipe-out proto code  NOT loaded
Aug  1 11:14:50 h969352 amavis[31586]: BSMTP-out proto code NOT loaded
Aug  1 11:14:50 h969352 amavis[31586]: Local-out proto code loaded
Aug  1 11:14:50 h969352 amavis[31586]: OS_Fingerprint code  NOT loaded
Aug  1 11:14:50 h969352 amavis[31586]: ANTI-VIRUS code      loaded
Aug  1 11:14:50 h969352 amavis[31586]: ANTI-SPAM code       loaded
Aug  1 11:14:50 h969352 amavis[31586]: ANTI-SPAM-SA code    loaded
Aug  1 11:14:50 h969352 amavis[31586]: Unpackers code       loaded


Aug  1 11:14:50 h969352 amavis[31586]: Found secondary av scanner
ClamAV-clamscan at /usr/bin/clamscan
Aug  1 11:14:50 h969352 amavis[31586]: Creating db in
/var/lib/amavis/db/; BerkeleyDB 0.27, libdb 4.3
Aug  1 11:14:50 h969352 amavis[31586]: SpamControl: initializing
Mail::SpamAssassin
Aug  1 11:14:50 h969352 amavis[31586]: SpamControl: init_pre_fork done

So wie man sehen kann wird alles geladen. Die mails laufen auch am
Virenscanner vorbei oder am Spamcontrol nur wird nix gemacht......

Dann gleich noch anschließend wie kann ich Spamassassin Trainieren?

Ich würde das gerne so realisieren, dass wenn man manuel eine Mail in
den Spam-Ordner verschiebt, das diese das immer als Spam für das
jeweilige Postfach idendifiziert wird. Ich habe es auf folgende Weise
versucht.

#!/bin/bash -e

SADIR=/var/lib/amavis/.spamassassin
DBPATH=/var/lib/amavis/.spamassassin/bayes
SPAMFOLDERS="\
        /home/vmail/well-known-customer.com/fred/.spam/cur \
        /home/vmail/spamtrap.org/jeanne/.spam/cur \
        "
HAMFOLDERS="\
        /home/vmail/spamtrap.org/jeanne/.trash/cur \
        "

for spamfolder in $SPAMFOLDERS ; do \
        echo Learning spam from $spamfolder ; \
        nice sa-learn --spam --showdots --dbpath $DBPATH $spamfolder
done

for hamfolder in $HAMFOLDERS ; do \
        echo Learning ham from $hamfolder ; \
        nice sa-learn --ham --showdots --dbpath $DBPATH $hamfolder
done


chown -R amavis:amavis $SADIR

Es steht auch da das Spamassassin was neues gelernt hat :) Aber wenn
ich dann von dem Absender eine erneute Mails schicke, wird
sie nicht mit ***SPAM*** so wie in Amavis eingestellt makiert.

Wie wäre denn jetzt meine vorgehensweise um das Problem zu lösen.


MFG

Jan





-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iD8DBQFEzx9NFxoGn/ckUGURAg9+AKCTy2/baMI0YzW8S78oyt2pnKRMHwCeNVbM
RuHxlPmqNUHC7HSrXcaurUA=
=N66F
-----END PGP SIGNATURE-----




Mehr Informationen über die Mailingliste Postfixbuch-users