Clam-AV wird nicht eingebunde

Mardor

Well-Known Member
Hallo,

leider habe ich noch ein Problem. Irgendwie schaffe ich es nicht Clam-AV als Virenkiller für Amavis einzubunden.

Code:
Nov 17 20:20:39 zar amavis[10495]: (10495-13) ESMTP::10024 /var/amavis/tmp/amavis-20091117T165310-10495: <newsletter@mytoys-mail.de> -> <mail@xxxx.info> SIZE=49818 BODY=8BITMIME Received: from zar.wan.xxxx.info ([127.0.0.1]) by localhost (zar.wan.xxxx.info [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <mail@xxxx.info>; Tue, 17 Nov 2009 20:20:39 +0100 (CET)
Nov 17 20:20:40 zar amavis[10495]: (10495-13) Checking: 58I7ZmjHkCq9 [213.61.120.247] <newsletter@mytoys-mail.de> -> <mail@xxxx.info>
Nov 17 20:20:40 zar amavis[10495]: (10495-13) p003 1 Content-Type: multipart/alternative
Nov 17 20:20:40 zar amavis[10495]: (10495-13) p001 1/1 Content-Type: text/plain, size: 1734 B, name: 
Nov 17 20:20:40 zar amavis[10495]: (10495-13) p002 1/2 Content-Type: text/html, size: 45865 B, name: 
Nov 17 20:20:40 zar amavis[10495]: (10495-13) ClamAV-clamd: Can't send to socket /var/run/clamav/clamd: Socket is not connected, retrying (1)
Nov 17 20:20:40 zar postfix/smtpd[11628]: disconnect from mail03.mytoys-mail.de[213.61.120.247]
Nov 17 20:20:41 zar amavis[10495]: (10495-13) (!)ClamAV-clamd: Can't connect to UNIX socket /var/run/clamav/clamd: No such file or directory, retrying (2)
Nov 17 20:20:47 zar amavis[10495]: (10495-13) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd (Can't connect to UNIX socket /var/run/clamav/clamd: No such file or directory) at (eval 117) line 373.\n
Nov 17 20:20:47 zar amavis[10495]: (10495-13) (!!)WARN: all primary virus scanners failed, considering backups
Nov 17 20:20:50 zar amavis[10495]: (10495-13) lookup_sql_field(id) (WARN: no such field in the SQL table), "mail@xxxx.info" result=undef
Nov 17 20:20:56 zar amavis[10495]: (10495-13) SPAM-TAG, <newsletter@mytoys-mail.de> -> <mail@xxxx.info>, No, score=-0.329 tagged_above=-1000 required=3.2 tests=[AWL=-0.500, HTML_IMAGE_RATIO_04=0.17, HTML_MESSAGE=0.001] autolearn=no

Diese Meldung erscheint bei mir im Log. Ich habe bereits testweise versch. Verzeichnisse auf 777 geändert (/var/virusmails) aber irgendwie habe ich keinen Erfolg.

In der amavis.conf ist folgende Zeile aktiv:

Code:
 ['ClamAV-clamd',
   \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd"],
   qr/\bOK$/m, qr/\bFOUND$/m,
   qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],

In der clamd.conf habe ich als User bereits amavis und clamav getestet. Weiterhin ist AllowSupplementaryGroups yes aktiv. Leider hat absolut nichts geholfen.

Hätte jemand eine Idee für mich.

Gruß Mardor
 
Moin Mardor,

Hallo,

leider habe ich noch ein Problem. Irgendwie schaffe ich es nicht Clam-AV als Virenkiller für Amavis einzubunden.

Code:
Nov 17 20:20:39 zar amavis[10495]: (10495-13) ESMTP::10024 [...]
Nov 17 20:20:40 zar amavis[10495]: (10495-13) ClamAV-clamd: Can't send to socket /var/run/clamav/clamd: Socket is not connected, retrying (1)
Nov 17 20:20:40 zar postfix/smtpd[11628]: disconnect from mail03.mytoys-mail.de[213.61.120.247]
Nov 17 20:20:41 zar amavis[10495]: (10495-13) (!)ClamAV-clamd: Can't connect to UNIX socket /var/run/clamav/clamd: No such file or directory, retrying (2)
Nov 17 20:20:47 zar amavis[10495]: (10495-13) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd (Can't connect to UNIX socket /var/run/clamav/clamd: No such file or directory) at (eval 117) line 373.\n

Hätte jemand eine Idee für mich.

Gruß Mardor

Schau ma mal.
Diese Problematik kommt mir sehr bekannt vor.
Gelöst habe ich es schließlich mittels ClamSMTP.

Um dem Problem auf die Spur zu kommen, starte doch mal den Clamav alleine und schau ins Log-File, dass Du vorher sinnvollerweise aktiviert hast.
Möglicherweise kann Clamav den Socket nicht anlegen, weil es keine Berechtigung hat, auf das Verzeichnis /var/run/clamav zuzugreifen.
Gleiches gilt übrigens auch für freshclam!

Grüße

JueDan
 
Hallo juedan,

irgendwie komme ich nicht weiter.

Wenn ich den Log aktiviere bekomme ich folgende Meldung:
Code:
+++ Started at Wed Nov 18 20:28:33 2009
clamd daemon 0.95.3 (OS: freebsd7.2, ARCH: i386, CPU: i386)
Running as user clamav (UID 106, GID 106)
Log file size limited to 1048576 bytes.
Reading databases from /var/db/clamav
Not loading PUA signatures.
Loaded 652516 signatures.
LOCAL: Unix socket file /var/run/clamav/clamd.sock
LOCAL: Setting connection queue length to 15
Limits: Global size limit set to 104857600 bytes.
Limits: File size limit set to 26214400 bytes.
Limits: Recursion level limit set to 16.
Limits: Files limit set to 10000.
Limits: Core-dump limit is 4294967295.
Archive support enabled.
Algorithmic detection enabled.
Portable Executable support enabled.
ELF support enabled.
Mail files support enabled.
OLE2 support enabled.
PDF support enabled.
HTML support enabled.
Self checking every 600 seconds.
Listening daemon: PID: 44218
MaxQueue set to: 100
Set stacksize to 1114112

Meine Verzeichnisse sind meiner Meinung nach auch richtig gesetzt:

Code:
drwxr-xr-x   2 clamav   clamav     512 Nov 18 21:06 clamav

Code:
-rw-rw-r--  1 clamav  clamav    5 Nov 18 21:06 clamd.pid
srwxrwxrwx  1 clamav  clamav    0 Nov 18 21:06 clamd.sock
-rw-rw----  1 clamav  clamav    5 Nov 15 22:06 freshclam.pid

clamstmp habe ich testweise installiert. Aber wenn ich die Anmerkungen unter http://memberwebs.com/stef/software/clamsmtp/postfix.html ausgeführt habe, funktioniert noch nicht mal meine Spamfilterung.

Hast du noch eine Idee für mich ?
Ich komme leider wirklich nicht auf meinen Fehler.

Gruß Mardor
 
Vielleicht den Socketnamen richtig setzen?

Code:
 ['ClamAV-clamd',
   \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd[B].sock"[/B]],
   qr/\bOK$/m, qr/\bFOUND$/m,
   qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
 
Hallo,

nach der Änderung erhalte ich folgende Meldung:


Code:
Nov 19 17:07:15 zar amavis[52002]: (52002-01) Checking: oidwzgVkaSK0 [213.165.64.20] <MSBSSK@gmx.de> -> <mail@netmage.info>
Nov 19 17:07:15 zar amavis[52002]: (52002-01) p001 1 Content-Type: text/plain, size: 193 B, name: 
Nov 19 17:07:15 zar amavis[52002]: (52002-01) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/amavis/tmp/amavis-20091119T170715-52002/parts: lstat() failed: Permission denied. ERROR\n"
Nov 19 17:07:15 zar amavis[52002]: (52002-01) (!)ClamAV-clamd av-scanner FAILED: CODE(0x8a061c4) unexpected , output="/var/amavis/tmp/amavis-20091119T170715-52002/parts: lstat() failed: Permission denied. ERROR\n" at (eval 117) line 594.
Nov 19 17:07:15 zar amavis[52002]: (52002-01) (!!)WARN: all primary virus scanners failed, considering backups
Thu Nov 19 17:07:15 2009 -> WARNING: lstat() failed on: /var/amavis/tmp/amavis-20091119T170715-52002/parts
Nov 19 17:07:19 zar amavis[52002]: (52002-01) run_av (ClamAV-clamscan): /var/amavis/tmp/amavis-20091119T170715-52002/parts INFECTED: Eicar-Test-Signature, Eicar-Test-Signature
Nov 19 17:07:19 zar amavis[52002]: (52002-01) virus_scan: (Eicar-Test-Signature), detected by 1 scanners: ClamAV-clamscan

Irgenwie scheint es noch nicht komplett zu funktionieren.

Gruß Mardor
 
Back
Top