Mail Probleme & ALL VIRUS SCANNERS FAILED  [GELÖST]

Diskussionen zur Bedienung von KeyHelp.
Post Reply
User avatar
Ralph
Posts: 786
Joined: Mon 30. Mar 2020, 16:14

Mail Probleme & ALL VIRUS SCANNERS FAILED

Post by Ralph »

Debian 11
Keyhelp 22.2
Kernel 5.10.0-19-amd64

1. ich habe mehrere Hosts unter der gleichen Domain als A-record Subdomain laufen (externe DNS)
host1.mydomain.tld > IP 123456
host2.mydomain.tld > IP 123457
host3.mydomain.tld > IP 123458 (Keyhelp)

Wenn ich nun von host3 eine Email über Roundcube an die Hauptdomain (user@mydomain.tld) sende, versucht KH diese vermutlich lokal auszuliefern:
(host 127.0.0.1[127.0.0.1] said: 421 4.3.2 Service shutting down, closing channel (in reply to end of DATA command))
Wo und wie kann ich das mit KH (DNS) umsetzen damit die Hauptdomain gefunden wird?

2. ClamAV-clamscan av-scanner FAILED
hatte zuvor die Clam Checks fürs System (Dateien) deaktiviert nur Emails sollen geprüft werden, habe es dann wieder aktiviert und Neustart ...
das Problem besteht weiterhin, auch extrem hohe load (clamav 98,90 %) vermutlich aufgrund des clamd Fehlers ...

Ist das in der default KH main.cf so richtig das dort keine bind IP Adressen gesetzt sind?
Ich verwende IPv4 und IPv6

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myhostname = host3.mydomain.tld
diese Parameter sind nicht vorhanden:
smtp_bind_address =
smtp_bind_address6 =

Code: Select all

sudo service status amavis
status: unrecognized service
root@host3:/home/herongl666# sudo service amavis status
● amavis.service - Interface between MTA and virus scanner/content filters
     Loaded: loaded (/lib/systemd/system/amavis.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-11-18 14:24:28 CET; 4min 31s ago
       Docs: http://www.ijs.si/software/amavisd/#doc
    Process: 730 ExecStartPre=/usr/bin/find /var/lib/amavis -maxdepth 1 -name amavis-* -type d -exec rm -rf {} ; (code=exited, status=0/SUCCESS)
    Process: 814 ExecStartPre=/usr/bin/find /var/lib/amavis/tmp -maxdepth 1 -name amavis-* -type d -exec rm -rf {} ; (code=exited, status=0/SUCCES>
   Main PID: 822 (/usr/sbin/amavi)
      Tasks: 3 (limit: 2275)
     Memory: 146.9M
        CPU: 2.613s
     CGroup: /system.slice/amavis.service
             ├─ 822 /usr/sbin/amavisd-new (master)
             ├─1417 /usr/sbin/amavisd-new (virgin child)
             └─1418 /usr/sbin/amavisd-new (virgin child)

Nov 18 14:24:34 host3 amavis[822]: No decoder for       .F
Nov 18 14:24:34 host3 amavis[822]: No decoder for       .arc
Nov 18 14:24:34 host3 amavis[822]: No decoder for       .doc
Nov 18 14:24:34 host3 amavis[822]: No decoder for       .exe
Nov 18 14:24:34 host3 amavis[822]: No decoder for       .lrz
Nov 18 14:24:34 host3 amavis[822]: No decoder for       .lz4
Nov 18 14:24:34 host3 amavis[822]: No decoder for       .lzo
Nov 18 14:24:34 host3 amavis[822]: No decoder for       .zoo
Nov 18 14:24:34 host3 amavis[822]: Using primary internal av scanner code for ClamAV-clamd
Nov 18 14:24:34 host3 amavis[822]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan

Code: Select all

sudo service clamav-daemon status
● clamav-daemon.service - Clam AntiVirus userspace daemon
     Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/clamav-daemon.service.d
             └─extend.conf
     Active: active (running) since Fri 2022-11-18 14:24:28 CET; 8min ago
       Docs: man:clamd(8)
             man:clamd.conf(5)
             https://docs.clamav.net/
    Process: 732 ExecStartPre=/bin/mkdir -p /run/clamav (code=exited, status=0/SUCCESS)
    Process: 792 ExecStartPre=/bin/chown clamav /run/clamav (code=exited, status=0/SUCCESS)
   Main PID: 800 (clamd)
      Tasks: 2 (limit: 2275)
     Memory: 1.2G
        CPU: 26.192s
     CGroup: /system.slice/clamav-daemon.service
             └─800 /usr/sbin/clamd --foreground=true

Nov 18 14:25:02 host3 clamd[800]: Fri Nov 18 14:25:02 2022 -> Portable Executable support enabled.
Nov 18 14:25:02 host3 clamd[800]: Fri Nov 18 14:25:02 2022 -> ELF support enabled.
Nov 18 14:25:02 host3 clamd[800]: Fri Nov 18 14:25:02 2022 -> Mail files support enabled.
Nov 18 14:25:02 host3 clamd[800]: Fri Nov 18 14:25:02 2022 -> OLE2 support enabled.
Nov 18 14:25:02 host3 clamd[800]: Fri Nov 18 14:25:02 2022 -> PDF support enabled.
Nov 18 14:25:02 host3 clamd[800]: Fri Nov 18 14:25:02 2022 -> SWF support enabled.
Nov 18 14:25:02 host3 clamd[800]: Fri Nov 18 14:25:02 2022 -> HTML support enabled.
Nov 18 14:25:02 host3 clamd[800]: Fri Nov 18 14:25:02 2022 -> XMLDOCS support enabled.
Nov 18 14:25:02 host3 clamd[800]: Fri Nov 18 14:25:02 2022 -> HWP3 support enabled.
Nov 18 14:25:02 host3 clamd[800]: Fri Nov 18 14:25:02 2022 -> Self checking every 3600 seconds.

Code: Select all

Nov 18 14:35:09 host3 postfix/submission/smtpd[150328]: warning: TLS SNI from localhost[127.0.0.1] is invalid: 127.0.0.1
Nov 18 14:35:09 host3 postfix/submission/smtpd[150328]: warning: TLS SNI from localhost[127.0.0.1] is invalid: 127.0.0.1
Nov 18 14:35:10 host3 amavis[1417]: (01417-02) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: Connection refused
Nov 18 14:35:11 host3 amavis[1417]: (01417-02) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: Connection refused
Nov 18 14:35:11 host3 amavis[1417]: (01417-02) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
Nov 18 14:35:17 host3 amavis[1417]: (01417-02) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: Connection refused
Nov 18 14:35:17 host3 amavis[1417]: (01417-02) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 98) line 659.\n
Nov 18 14:35:17 host3 amavis[1417]: (01417-02) (!)WARN: all primary virus scanners failed, considering backups
Nov 18 14:36:20 host3 amavis[1417]: (01417-02) (!)ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan KILLED, signal 9 (0009) at (eval 98) line 951.
Nov 18 14:36:20 host3 amavis[1417]: (01417-02) (!!)AV: ALL VIRUS SCANNERS FAILED
Nov 18 14:36:21 host3 amavis[1417]: (01417-02) (!)TempDir removal: tempdir is to be PRESERVED: /var/lib/amavis/tmp/amavis-20221118T143406-01417-eVH3pMZr
Last edited by Ralph on Sat 19. Nov 2022, 17:00, edited 1 time in total.
User avatar
Ralph
Posts: 786
Joined: Mon 30. Mar 2020, 16:14

Re: Mail Probleme & ALL VIRUS SCANNERS FAILED

Post by Ralph »

was die Clamd CPU load betrifft das kommt wahrscheinlich von den DatabaseCustomURL in:
/etc/clamav/freshclam.conf
habe die mal deaktiviert sieht jetzt gut aus, schätze mal die haben den clamav-daemon lahmgelegt(ClamAV-clamscan av-scanner FAILED)

Wenn ich amavis aus der main.cf rausnehme, kann ich auch an die anderen Server senden mit der Hauptdomain im Hostname ...
also dieses Problem tritt dann seltsamerweise nicht mehr auf:
host 127.0.0.1[127.0.0.1] said: 421 4.3.2 Service shutting down, closing channel

Dies hier bleibt weiterhin present:
Nov 18 14:35:09 host00 postfix/submission/smtpd[150328]: warning: TLS SNI from localhost[127.0.0.1] is invalid: 127.0.0.1

Bleibt also noch der amavis und TLS SNI Fehler
User avatar
Ralph
Posts: 786
Joined: Mon 30. Mar 2020, 16:14

Re: Mail Probleme & ALL VIRUS SCANNERS FAILED  [GELÖST]

Post by Ralph »

OK, der clamav-daemon hatte sich aufgehängt bei irgendeiner OP, unter /var/lib/clamav war ein tmp Ordner mit defektem Download, den habe ich gelöscht, dann die DatabaseCustomURL wieder aktiviert und:
systemctl stop clamav-freshclam.service
sudo freshclam
systemctl start clamav-freshclam.service
systemctl status clamav-freshclam.service
Active: active (running) since Sat 2022-11-19 15:48:20 CET; 8s ago

Der Mail Versand und Empfang klappt jetzt, die CPU Load ist auch normal :D

Ich sehe bzgl. Amavis oder Clamav allerdings keine Checks in den Logs, ausgehende Mails werden nicht markiert im Header Clamav oder Spam checked auch und eingehende Mails haben keine Infos im Header.
Ist das bei Amavis so richtig? Kenne mich damit noch nicht aus ... habe Roundcube verwendet.

Dann habe ich hier noch ein paar dubiose Logs entdeckt, kann das ignoriert werden?

Code: Select all

mail.log
Nov 19 15:14:19 host3 postfix/submission/smtpd[55122]: warning: TLS SNI from host3.mydomain.tld.local[127.0.0.1] is invalid: 127.0.0.1
DNSBL:
Nov 19 15:14:40 host00 postfix/smtpd[169059]: warning: 1.5.2.5.8.2.e.d.1.e.b.5.9.6.7.d.1.0.b.9.3.7.a.0.4.1.f.1.0.0.6.2.all.spamrats.com: RBL lookup error: Host or domain name not found. Name service error for name=1.5.2.5.8.2.e.d.1.e.b.5.9.6.7.d.1.0.b.9.3.7.a.0.4.1.f.1.0.0.6.2.all.spamrats.com type=A: Host not found, try again

sudo journalctl -eu amavis
Nov 19 14:51:17 host3.mydomain.tld amavis[910]: starting. /usr/sbin/amavisd-new at host3.mydomain.tld amavisd-new-2.11.1 (20181009), Unicode aware, LANG>
Nov 19 14:51:17 host3.mydomain.tld amavis[910]: perl=5.032001, user=117, EUID: 117 (117);  group=, EGID: 123 121 123 (123 121 123)
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: Net::Server: Group Not Defined.  Defaulting to EGID '123 121 123'
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: Net::Server: User Not Defined.  Defaulting to EUID '117'
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No $altermime,         not using it
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No ext program for   .lrz, tried: lrzip -q -k -d -o -, lrzcat -q -k
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No ext program for   .lzo, tried: lzop -d
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No ext program for   .lz4, tried: lz4c -d
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No ext program for   .rpm, tried: rpm2cpio.pl, rpm2cpio
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No ext program for   .rar, tried: unrar-free
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No ext program for   .arj, tried: arj, unarj
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No ext program for   .arc, tried: nomarch, arc
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No ext program for   .zoo, tried: zoo
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No ext program for   .doc, tried: ripole
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No ext program for   .cab, tried: cabextract
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No ext program for   .exe, tried: unrar-free; arj, unarj
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No decoder for       .F
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No decoder for       .arc
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No decoder for       .doc
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No decoder for       .exe
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No decoder for       .lrz
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No decoder for       .lz4
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No decoder for       .lzo
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: No decoder for       .zoo
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: Using primary internal av scanner code for ClamAV-clamd
Nov 19 14:51:18 host3.mydomain.tld amavis[910]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
User avatar
Ralph
Posts: 786
Joined: Mon 30. Mar 2020, 16:14

Re: Mail Probleme & ALL VIRUS SCANNERS FAILED

Post by Ralph »

Sorry, Amavis hatte ich wg. der Fehlersuche deaktiviert in der main.cf, der Check status wird jetzt angezeigt bei eingehenden Mails:
X-Virus-Scanned: Debian amavisd-new at xxxx.xxxx.tld

Das mit dem Clamd Hänger scheint das ganze Inferno hier verursacht zu haben, ist bei einer anderen Installation nicht aufgetreten, das war eine defekte Rule worauf clamd keine Rechte hatte, nach löschen war das Problem behoben.

Es ist jetzt auch soweit alles OK bis auf das hier, liegt es daran das Roundcube verwendet wurde?

Code: Select all

Nov 19 16:44:51 host3 postfix/submission/smtpd[177125]: warning: TLS SNI from host3.mydomain.tld[127.0.0.1] is invalid: 127.0.0.1
Danach gebe ich Ruhe - versprochen :mrgreen:
tab-kh
Posts: 450
Joined: Thu 22. Apr 2021, 23:06

Re: Mail Probleme & ALL VIRUS SCANNERS FAILED

Post by tab-kh »

Was für eine Maschine ist das und wieviel RAM hat sie? Beim Virenscan mit Amavis können 4 GB schon grenzwertig wenig sein und zu Problemen führen. Dazu sollte es hier im Forum aber auch Threads geben.

Ich teste das gerade mal mit einem netcup KVM Server mit 8 GB RAM und 4 Cores. Debian 11.5, Keyhelp 22.2 und Kernel 5.10.0-19-amd64. Habe jetzt mal eine Testmail verschickt an eine andere Adresse bei einem shared Hoster. Auszug aus den Headern der empfangenen Mail (Domains teilweise geändert)

Code: Select all

Received: from mail01.meineserverdomain.tld (mail01.meineserverdomain.tld [xxx.xxx.xxx.xxx])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by mailserver.meinsharedhoster.tld (Postfix) with ESMTPS id BBEBA8620310
	for <user@meinedomain.tld.>; Sat, 19 Nov 2022 17:37:05 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
	by mail01.meineserverdomain.tld (Postfix) with ESMTP id 90EA6E054E
	for <user@meinedomain.tld>; Sat, 19 Nov 2022 17:31:56 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at mail01.meineserverdomain.tld
Received: from mail01.meineserverdomain.tld ([127.0.0.1])
	by localhost (mail01.meineserverdomain.tld [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 81fJDIWpFGZg for <user@meinedomain.tld>;
	Sat, 19 Nov 2022 17:31:53 +0100 (CET)
Received: from mail01.meineserverdomain.tld (localhost [127.0.0.1])
	by mail01.meineserverdomain.tld (Postfix) with ESMTPSA id 2F768E0090
	for <user@meinedomain.tld>; Sat, 19 Nov 2022 17:31:53 +0100 (CET)
User avatar
Ralph
Posts: 786
Joined: Mon 30. Mar 2020, 16:14

Re: Mail Probleme & ALL VIRUS SCANNERS FAILED

Post by Ralph »

tab-kh wrote: Sat 19. Nov 2022, 17:52 Was für eine Maschine ist das und wieviel RAM hat sie? Beim Virenscan mit Amavis können 4 GB schon grenzwertig wenig sein und zu Problemen führen. Dazu sollte es hier im Forum aber auch Threads geben.

Ich teste das gerade mal mit einem netcup KVM Server mit 8 GB RAM und 4 Cores. Debian 11.5, Keyhelp 22.2 und Kernel 5.10.0-19-amd64. Habe jetzt mal eine Testmail verschickt an eine andere Adresse bei einem shared Hoster. Auszug aus den Headern der empfangenen Mail (Domains teilweise geändert)

Code: Select all

Received: from mail01.meineserverdomain.tld (mail01.meineserverdomain.tld [xxx.xxx.xxx.xxx])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by mailserver.meinsharedhoster.tld (Postfix) with ESMTPS id BBEBA8620310
	for <user@meinedomain.tld.>; Sat, 19 Nov 2022 17:37:05 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
	by mail01.meineserverdomain.tld (Postfix) with ESMTP id 90EA6E054E
	for <user@meinedomain.tld>; Sat, 19 Nov 2022 17:31:56 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at mail01.meineserverdomain.tld
Received: from mail01.meineserverdomain.tld ([127.0.0.1])
	by localhost (mail01.meineserverdomain.tld [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 81fJDIWpFGZg for <user@meinedomain.tld>;
	Sat, 19 Nov 2022 17:31:53 +0100 (CET)
Received: from mail01.meineserverdomain.tld (localhost [127.0.0.1])
	by mail01.meineserverdomain.tld (Postfix) with ESMTPSA id 2F768E0090
	for <user@meinedomain.tld>; Sat, 19 Nov 2022 17:31:53 +0100 (CET)
Ja so sieht es jetzt auch bei mir aus, ich schätze beim freshclam gestern gab es Verbindungs-Probleme und das hat unbrauchbare temp. rules hinterlassen. Dadurch wurde der clamav-daemon gekillt, musste manuell behoben werden (defekte temp. rules löschen) und restart von clamav, amavis.
RAM 4GB, hab zusätzlich noch ein Swapfile angelegt 5GB, Resourcen sind momentan nur temporär, hab aber auch ein anderes System mit nur 2GB RAM laufen da gab es keine Ausfälle bisher.
Post Reply