Rspamd Einrichten: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(12 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
=Rspamd und ClamAV installieren=
+
=Rspamd und ClamAV installieren=
==Debian/Ubuntu==
+
==Debian/Ubuntu==
* apt install rspamd clamav-daemon clamav-freshclam redis-server postfix swaks
+
  apt install rspamd clamav-daemon clamav-freshclam redis-server swaks
  
==RHEL/CentOS==
+
==RHEL/CentOS==
* dnf install rspamd clamav clamav-update redis postfix swaks
+
  dnf install rspamd clamav clamav-update redis swaks
  
 
=Enablen und Starten der Dienste=
 
=Enablen und Starten der Dienste=
* systemctl enable rspamd --now
+
  systemctl enable rspamd --now
* systemctl enable clamav-daemon --now
+
  systemctl enable clamav-daemon --now
* systemctl enable redis-server --now
+
  systemctl enable redis-server --now
  
 
=== Redis-Anbindung (Das Gedächtnis von Rspamd) ===
 
=== Redis-Anbindung (Das Gedächtnis von Rspamd) ===
* Rspamd nutzt Redis für Bayes, Cache und Greylisting.
+
Damit Rspamd Scanergebnisse zwischenspeichern und statistische Analysen (Bayes) durchführen kann, ist eine Datenbank-Anbindung zwingend erforderlich. Ohne Redis arbeiten viele Module (wie Antivirus oder Greylisting) nur eingeschränkt oder gar nicht.
* Ohne Redis ist das System funktional eingeschränkt.
 
  
 
==== Konfiguration in Rspamd ====
 
==== Konfiguration in Rspamd ====
* Datei: /etc/rspamd/local.d/redis.conf
+
Rspamd benötigt einen zentralen Ort, an dem die Server-Adresse von Redis definiert ist. Dies geschieht üblicherweise in einer lokalen Konfigurationsdatei.
 +
 
 +
Datei: /etc/rspamd/local.d/redis.conf
 +
 
 
<pre>
 
<pre>
 +
# Definition des lokalen Redis-Servers
 
servers = "127.0.0.1:6379";
 
servers = "127.0.0.1:6379";
 
</pre>
 
</pre>
  
==== Prüfung der Anbindung ====
+
==== Warum das für ClamAV wichtig ist ====
* rspamadm control stat
+
Virenscanner-Ergebnisse sind CPU-intensiv. Rspamd speichert das Ergebnis eines Scans (z.B. "Diese Datei mit Hash XY ist ein Virus") für eine gewisse Zeit in Redis. Wenn dieselbe Mail erneut reinkommt, muss ClamAV nicht noch einmal rechnen – Rspamd holt die Antwort direkt aus dem Redis-Cache.
 +
 
 +
  systemctl start redis-server
 +
  systemctl enable redis-server.service
 +
 
 +
=Läuft alles=
 +
  systemctl status rspamd
 +
  systemctl status clamav-daemon
 +
  systemctl status redis-server
 +
 
 +
=Dienste und Ports von Rspamd= 
 +
==Rspamd Proxy== 
 +
*Der Rspamd Proxy dient als Eingangsfilter für E-Mails und leitet sie an die entsprechenden Worker weiter, um die Last zu verteilen. 
 +
<pre> 
 +
Port: 11332/tcp (Standardport für Proxy-Dienste) 
 +
</pre> 
 +
 
 +
==Rspamd Worker== 
 +
*Der Rspamd Worker führt die eigentliche Spam-Analyse durch und verarbeitet eingehende Nachrichten anhand von Regeln, Statistiken und externen Diensten. 
 +
<pre> 
 +
Port: 11333/tcp (Standardport für Worker-Dienste) 
 +
</pre> 
 +
 
 +
==Rspamd Controller== 
 +
*Der Rspamd Controller stellt eine API für Konfiguration, Statistiken und manuelles Training des Filters zur Verfügung. 
 +
<pre> 
 +
Port: 11334/tcp (Standardport für den Controller) 
 +
</pre>
  
==== Warum das für ClamAV wichtig ist ====
+
=Passwort für den Rspamd Controller und Port nach außen öffnen=
* Scan-Ergebnisse werden gecached.
+
;Passwort erzeugen
* Identische Anhänge werden nicht mehrfach gescannt.
+
  rspamadm pw
  
=Zustand prüfen=
+
Enter passphrase:
* systemctl status rspamd
+
$2$mqbbp8yb4fz8febgpxk7rb4db9p5njwg$xior3gxjbuc76bhsq4rapq7x98cssrm9qkr49kwapgdsahmpzjny
* systemctl status clamav-daemon
 
* systemctl status redis-server
 
  
=Rspamd Dienste und Ports=
+
;In der Worker Datei eintragen
==Rspamd Milter==
+
;Port an allen Interfaces lauschen lassen
* Schnittstelle zu Postfix
+
  cat /etc/rspamd/override.d/worker-controller.inc
 +
 
 
<pre>
 
<pre>
Port: 11332/tcp
+
password = "$2$mqbbp8yb4fz8febgpxk7rb4db9p5njwg$xior3gxjbuc76bhsq4rapq7x98cssrm9qkr49kwapgdsahmpzjny";
 +
bind_socket ="*:11334";
 
</pre>
 
</pre>
  
==Rspamd Worker==
+
=Restart=
 +
  systemctl restart rspamd
 +
 
 +
=Zugriff auf das Webinterface=
 +
*http://IP-Mailserver:11334
 +
[[Datei:Rspamd-1.png]]
 +
 
 +
=Milters= 
 +
*Milters sind Mail-Filter, die über das Milter-Protokoll mit MTA-Software wie Postfix oder Sendmail kommunizieren. 
 +
*Sie ermöglichen die Verarbeitung und Filterung von E-Mails in Echtzeit, bevor sie zugestellt werden. 
 +
*Milter werden häufig für Spam-Filterung, Virenscans und Inhaltsüberprüfungen eingesetzt.
 +
 
 +
=Einbinden in Postfix=
 +
  postconf -e "smtpd_milters=inet:127.0.0.1:11332"
 +
  postconf -e "non_smtpd_milters=inet:127.0.0.1:11332"
 +
  postfix reload
 +
 
 +
=Gtube Testmail=
 +
  swaks --to root@localhost --server 127.0.0.1 --body "XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X"
 +
 
 +
=Resultat=
 +
[[Datei:Rspamd-2.png]]
 +
 
 +
=Die Logs=
 +
  journalctl -u postfix | grep cleanup
 +
 
 +
Mar 18 19:21:22 mail.it113.int postfix/cleanup[7407]: 88BDDE0792: milter-reject: END-OF-MESSAGE from localhost[127.0.0.1]: 5.7.1 Gtube pattern; from=<root@mail.it113.int> to=<martha@mail.it113.int>
 +
Mar 18 19:21:22 mail.it113.int postfix/cleanup[7407]: 88BDDE0792: to=<martha@mail.it113.int>, orig_to=<martha>, relay=none, delay=0.19, delays=0.19/0/0/0, dsn=5.7.1, status=bounced (Gtube pattern)
 +
Mar 18 19:21:22 mail.it113.int postfix/cleanup[7410]: B3D24E07C2: message-id=<20250318182122.B3D24E07C2@mail.it113.int>
 +
 
 +
=Restart=
 +
*systemctl restart rspamd
 +
 
 +
=RBL-Integration in Rspamd und Postfix (Proof of Concept)= 
 +
==Rspamd mit lokaler RBL== 
 +
 
 +
===Configuration===
 +
  vi /etc/rspamd/local.d/multimap.conf
 +
 
 
<pre>
 
<pre>
Port: 11333/tcp
+
blacklist_ip {
 +
    type = "ip";
 +
    map = "/etc/rspamd/local.d/local_rbl.txt";
 +
    symbol = "LOCAL_RBL_HIT";
 +
    action = "reject";
 +
    description = "Lokale RBL-Hit";
 +
}
 
</pre>
 
</pre>
  
==Rspamd Controller==
+
===Blackliste===
 +
  echo 10.88.201.3 > /etc/rspamd/local.d/local_rbl.txt
 +
 
 +
===Rspamd neustarten=== 
 +
  systemctl restart rspamd
 +
 
 +
===Tests===
 +
;postiv
 +
  echo hallo welt | rspamc -i 10.88.113.22
 +
 
 
<pre>
 
<pre>
Port: 11334/tcp
+
Results for file: stdin (0 seconds)
 +
[Metric: default]
 +
Action: add header
 
</pre>
 
</pre>
  
=Passwort für den Rspamd Controller=
+
;negativ
* rspamadm pw
+
  echo hallo welt | rspamc -i 10.88.201.3
  
* Datei: /etc/rspamd/override.d/worker-controller.inc
 
 
<pre>
 
<pre>
password = "HASH";
+
Results for file: stdin (0 seconds)
bind_socket ="*:11334";
+
[Metric: default]
 +
Action: reject
 +
Symbol: LOCAL_RBL_HIT
 
</pre>
 
</pre>
  
=Postfix Anbindung (Milter)=
+
=ClamAV-Integration in Rspamd (UNIX Socket)=
* postconf -e "smtpd_milters=inet:127.0.0.1:11332"
+
Diese Dokumentation beschreibt die Anbindung von ClamAV über einen lokalen UNIX Socket an Rspamd. Dadurch entfällt die Nutzung eines TCP-Ports und die Kommunikation bleibt lokal und stabil.
* postconf -e "non_smtpd_milters=inet:127.0.0.1:11332"
 
* postfix reload
 
  
=Spam Test (GTUBE)=
+
== ClamAV Konfiguration ==
* swaks --to root@localhost --server 127.0.0.1 --data "Subject: GTUBE XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X"
 
  
=ClamAV Integration (UNIX Socket)=
+
Datei: /etc/clamav/clamd.conf 
* Kommunikation erfolgt lokal über Socket (kein TCP notwendig)
 
  
==ClamAV Konfiguration==
 
* Datei: /etc/clamav/clamd.conf
 
 
<pre>
 
<pre>
LocalSocket /run/clamav/clamd.ctl
+
# TCP deaktiviert
 +
#TCPSocket 3310
 +
#TCPAddr 127.0.0.1
 +
 
 +
# UNIX Socket
 +
LocalSocket /var/run/clamav/clamd.ctl
 
LocalSocketMode 666
 
LocalSocketMode 666
 
</pre>
 
</pre>
  
* Wichtig:
+
== Rspamd Konfiguration ==
* TCPSocket und TCPAddr müssen deaktiviert sein
+
 
 +
Datei: /etc/rspamd/override.d/antivirus.conf 
  
==Rspamd Konfiguration==
 
* Datei: /etc/rspamd/override.d/antivirus.conf
 
 
<pre>
 
<pre>
 
enabled = true;
 
enabled = true;
Zeile 87: Zeile 171:
 
     type = "clamav";
 
     type = "clamav";
 
     symbol = "CLAM_VIRUS";
 
     symbol = "CLAM_VIRUS";
     servers = "/run/clamav/clamd.ctl";
+
     servers = "/var/run/clamav/clamd.ctl";
 
     scan_text_mime = true;
 
     scan_text_mime = true;
 
     scan_mime_parts = true;
 
     scan_mime_parts = true;
Zeile 93: Zeile 177:
 
     scan_unauthenticated = true;
 
     scan_unauthenticated = true;
 
     stream = true;
 
     stream = true;
     action = "reject";
+
     score = 20.0;
 
}
 
}
 
</pre>
 
</pre>
  
=Virus Test (EICAR)=
+
== Validierung ==
* Datei erstellen:
+
 
 +
=== Erstellung der Test-E-Mail ===
 +
Datei: /tmp/virus.eml
 +
 
 
<pre>
 
<pre>
From: test@test.local
+
From: Test <test@it213.int>
To: root@localhost
+
To: Root <root@it213.int>
Subject: EICAR
+
Subject: EICAR Test
 
MIME-Version: 1.0
 
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="abc"
+
Content-Type: multipart/mixed; boundary="Grenzlinie"
  
--abc
+
--Grenzlinie
Content-Type: text/plain
+
Content-Type: text/plain; charset="utf-8"
  
Test
+
Antivirus Testmail.
  
--abc
+
--Grenzlinie
Content-Type: application/octet-stream
+
Content-Type: application/com-file; name="eicar.com"
 
Content-Disposition: attachment; filename="eicar.com"
 
Content-Disposition: attachment; filename="eicar.com"
 +
Content-Transfer-Encoding: 7bit
  
 
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
 
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
  
--abc--
+
--Grenzlinie--
 
</pre>
 
</pre>
  
* Test:
+
=== Testlauf ===
* rspamc /tmp/test.eml
+
  rspamc --ip 1.2.3.4 /tmp/virus.eml
  
=Rspamd Schwellenwerte=
+
Ein erfolgreicher Scan wird durch das Symbol CLAM_VIRUS bestätigt.
{| class="wikitable"
 
! Aktion !! Score !! Bedeutung
 
|-
 
| reject
 
| 15.0
 
| Mail wird abgelehnt
 
|-
 
| add_header
 
| 6.0
 
| Spam-Header wird gesetzt
 
|-
 
| greylist
 
| 4.0
 
| temporäre Ablehnung
 
|-
 
| no action
 
| < 4.0
 
| Mail ist sauber
 
|}
 
  
=Fehlerdiagnose=
+
== Fehlerdiagnose und Administration ==
==Logs==
+
 
 +
=== Protokolldateien überwachen ===
 
* /var/log/rspamd/rspamd.log
 
* /var/log/rspamd/rspamd.log
 
* /var/log/clamav/clamav.log
 
* /var/log/clamav/clamav.log
 +
* /var/log/clamav/freshclam.log
 +
* journalctl -u clamav-daemon -u rspamd
 +
 +
Live:
 +
<pre>
 +
tail -f /var/log/rspamd/rspamd.log | grep -E "antivirus|clamav"
 +
</pre>
 +
 +
=== Netzwerk-Ports und Sockets ===
 +
* Port 11333: Rspamd Worker
 +
* Port 11334: Rspamd Controller
 +
* Port 6379: Redis
 +
 +
<pre>
 +
ss -ltpn | grep -E "11333|11334|6379"
 +
</pre>
 +
 +
=== Redis Datenbank bereinigen ===
 +
<pre>
 +
redis-cli flushall
 +
</pre>
 +
 +
=== Manueller Virenscan ===
 +
<pre>
 +
clamdscan /tmp/virus.eml
 +
</pre>
 +
 +
=== Aktualisierung der Virendefinitionen ===
 +
<pre>
 +
systemctl status clamav-freshclam
 +
systemctl stop clamav-freshclam
 +
freshclam
 +
systemctl start clamav-freshclam
 +
</pre>
 +
 +
=== Prüfung der Dienstkonfiguration ===
 +
<pre>
 +
rspamadm configtest
 +
</pre>
  
==Live Analyse==
+
=== Rspamd kommuniziert mit ClamAV? ===
* tail -f /var/log/rspamd/rspamd.log | grep -E "clamav|virus"
 
  
==Kommunikation prüfen==
+
;Cache leeren
* redis-cli flushall
+
  redis-cli flushall
* systemctl restart rspamd
 
  
==UNIX Socket Debug==
+
;UNIX Socket Debug
* apt install strace
+
  apt install strace
* strace -p $(pidof clamd) -e trace=network
+
  strace -p $(pidof clamd) -e trace=network
  
==TCP Debug (optional)==
+
;TCP Debug (optional)
* apt install tcpdump
+
  apt install tcpdump
* tcpdump -ni lo port 3310
+
  tcpdump -ni lo port 3310

Aktuelle Version vom 23. März 2026, 12:00 Uhr

Rspamd und ClamAV installieren

Debian/Ubuntu

 apt install rspamd clamav-daemon clamav-freshclam redis-server swaks

RHEL/CentOS

 dnf install rspamd clamav clamav-update redis swaks

Enablen und Starten der Dienste

 systemctl enable rspamd --now
 systemctl enable clamav-daemon --now
 systemctl enable redis-server --now

Redis-Anbindung (Das Gedächtnis von Rspamd)

Damit Rspamd Scanergebnisse zwischenspeichern und statistische Analysen (Bayes) durchführen kann, ist eine Datenbank-Anbindung zwingend erforderlich. Ohne Redis arbeiten viele Module (wie Antivirus oder Greylisting) nur eingeschränkt oder gar nicht.

Konfiguration in Rspamd

Rspamd benötigt einen zentralen Ort, an dem die Server-Adresse von Redis definiert ist. Dies geschieht üblicherweise in einer lokalen Konfigurationsdatei.

Datei: /etc/rspamd/local.d/redis.conf

# Definition des lokalen Redis-Servers
servers = "127.0.0.1:6379";

Warum das für ClamAV wichtig ist

Virenscanner-Ergebnisse sind CPU-intensiv. Rspamd speichert das Ergebnis eines Scans (z.B. "Diese Datei mit Hash XY ist ein Virus") für eine gewisse Zeit in Redis. Wenn dieselbe Mail erneut reinkommt, muss ClamAV nicht noch einmal rechnen – Rspamd holt die Antwort direkt aus dem Redis-Cache.

 systemctl start redis-server
 systemctl enable redis-server.service

Läuft alles

 systemctl status rspamd
 systemctl status clamav-daemon
 systemctl status redis-server

Dienste und Ports von Rspamd

Rspamd Proxy

  • Der Rspamd Proxy dient als Eingangsfilter für E-Mails und leitet sie an die entsprechenden Worker weiter, um die Last zu verteilen.
  
Port: 11332/tcp (Standardport für Proxy-Dienste)  

Rspamd Worker

  • Der Rspamd Worker führt die eigentliche Spam-Analyse durch und verarbeitet eingehende Nachrichten anhand von Regeln, Statistiken und externen Diensten.
  
Port: 11333/tcp (Standardport für Worker-Dienste)  

Rspamd Controller

  • Der Rspamd Controller stellt eine API für Konfiguration, Statistiken und manuelles Training des Filters zur Verfügung.
  
Port: 11334/tcp (Standardport für den Controller)  

Passwort für den Rspamd Controller und Port nach außen öffnen

Passwort erzeugen
 rspamadm pw
Enter passphrase: 
$2$mqbbp8yb4fz8febgpxk7rb4db9p5njwg$xior3gxjbuc76bhsq4rapq7x98cssrm9qkr49kwapgdsahmpzjny
In der Worker Datei eintragen
Port an allen Interfaces lauschen lassen
 cat /etc/rspamd/override.d/worker-controller.inc
 
password = "$2$mqbbp8yb4fz8febgpxk7rb4db9p5njwg$xior3gxjbuc76bhsq4rapq7x98cssrm9qkr49kwapgdsahmpzjny";
bind_socket ="*:11334";

Restart

 systemctl restart rspamd

Zugriff auf das Webinterface

Rspamd-1.png

Milters

  • Milters sind Mail-Filter, die über das Milter-Protokoll mit MTA-Software wie Postfix oder Sendmail kommunizieren.
  • Sie ermöglichen die Verarbeitung und Filterung von E-Mails in Echtzeit, bevor sie zugestellt werden.
  • Milter werden häufig für Spam-Filterung, Virenscans und Inhaltsüberprüfungen eingesetzt.

Einbinden in Postfix

 postconf -e "smtpd_milters=inet:127.0.0.1:11332"
 postconf -e "non_smtpd_milters=inet:127.0.0.1:11332"
 postfix reload

Gtube Testmail

 swaks --to root@localhost --server 127.0.0.1 --body "XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X"

Resultat

Rspamd-2.png

Die Logs

 journalctl -u postfix | grep cleanup
Mar 18 19:21:22 mail.it113.int postfix/cleanup[7407]: 88BDDE0792: milter-reject: END-OF-MESSAGE from localhost[127.0.0.1]: 5.7.1 Gtube pattern; from=<root@mail.it113.int> to=<martha@mail.it113.int>
Mar 18 19:21:22 mail.it113.int postfix/cleanup[7407]: 88BDDE0792: to=<martha@mail.it113.int>, orig_to=<martha>, relay=none, delay=0.19, delays=0.19/0/0/0, dsn=5.7.1, status=bounced (Gtube pattern)
Mar 18 19:21:22 mail.it113.int postfix/cleanup[7410]: B3D24E07C2: message-id=<20250318182122.B3D24E07C2@mail.it113.int>

Restart

  • systemctl restart rspamd

RBL-Integration in Rspamd und Postfix (Proof of Concept)

Rspamd mit lokaler RBL

Configuration

 vi /etc/rspamd/local.d/multimap.conf
blacklist_ip {
    type = "ip";
    map = "/etc/rspamd/local.d/local_rbl.txt";
    symbol = "LOCAL_RBL_HIT";
    action = "reject";
    description = "Lokale RBL-Hit";
}

Blackliste

 echo 10.88.201.3 > /etc/rspamd/local.d/local_rbl.txt

Rspamd neustarten

 systemctl restart rspamd

Tests

postiv
 echo hallo welt | rspamc -i 10.88.113.22
Results for file: stdin (0 seconds)
[Metric: default]
Action: add header
negativ
 echo hallo welt | rspamc -i 10.88.201.3
Results for file: stdin (0 seconds)
[Metric: default]
Action: reject
Symbol: LOCAL_RBL_HIT

ClamAV-Integration in Rspamd (UNIX Socket)

Diese Dokumentation beschreibt die Anbindung von ClamAV über einen lokalen UNIX Socket an Rspamd. Dadurch entfällt die Nutzung eines TCP-Ports und die Kommunikation bleibt lokal und stabil.

ClamAV Konfiguration

Datei: /etc/clamav/clamd.conf

# TCP deaktiviert
#TCPSocket 3310
#TCPAddr 127.0.0.1

# UNIX Socket
LocalSocket /var/run/clamav/clamd.ctl
LocalSocketMode 666

Rspamd Konfiguration

Datei: /etc/rspamd/override.d/antivirus.conf

enabled = true;
clamav {
    type = "clamav";
    symbol = "CLAM_VIRUS";
    servers = "/var/run/clamav/clamd.ctl";
    scan_text_mime = true;
    scan_mime_parts = true;
    min_size = 0;
    scan_unauthenticated = true;
    stream = true;
    score = 20.0;
}

Validierung

Erstellung der Test-E-Mail

Datei: /tmp/virus.eml

From: Test <test@it213.int>
To: Root <root@it213.int>
Subject: EICAR Test
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="Grenzlinie"

--Grenzlinie
Content-Type: text/plain; charset="utf-8"

Antivirus Testmail.

--Grenzlinie
Content-Type: application/com-file; name="eicar.com"
Content-Disposition: attachment; filename="eicar.com"
Content-Transfer-Encoding: 7bit

X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

--Grenzlinie--

Testlauf

 rspamc --ip 1.2.3.4 /tmp/virus.eml

Ein erfolgreicher Scan wird durch das Symbol CLAM_VIRUS bestätigt.

Fehlerdiagnose und Administration

Protokolldateien überwachen

  • /var/log/rspamd/rspamd.log
  • /var/log/clamav/clamav.log
  • /var/log/clamav/freshclam.log
  • journalctl -u clamav-daemon -u rspamd

Live:

tail -f /var/log/rspamd/rspamd.log | grep -E "antivirus|clamav"

Netzwerk-Ports und Sockets

  • Port 11333: Rspamd Worker
  • Port 11334: Rspamd Controller
  • Port 6379: Redis
ss -ltpn | grep -E "11333|11334|6379"

Redis Datenbank bereinigen

redis-cli flushall

Manueller Virenscan

clamdscan /tmp/virus.eml

Aktualisierung der Virendefinitionen

systemctl status clamav-freshclam
systemctl stop clamav-freshclam
freshclam
systemctl start clamav-freshclam

Prüfung der Dienstkonfiguration

rspamadm configtest

Rspamd kommuniziert mit ClamAV?

Cache leeren
 redis-cli flushall
UNIX Socket Debug
 apt install strace
 strace -p $(pidof clamd) -e trace=network
TCP Debug (optional)
 apt install tcpdump
 tcpdump -ni lo port 3310