Mail server
ClamAV antivirus on the mail server
Installing ClamAV via the uAdmin wizard, Rspamd integration, RAM requirements, panel management and EICAR testing.
-
How it works
ClamAV does not attach directly to Postfix — uAdmin integrates it through the Rspamd antivirus module. Every message passing the milter (port 11332) can be scanned; a virus gets the CLAM_VIRUS symbol. The default action is reject.
-
RAM requirements
clamd uses significant RAM (virus signatures). The install step is skipped automatically if the VM has less than ~1.2 GB free memory and less than ~2.8 GB total. For production use a mail VM with at least 2 GB RAM (4 GB ideal). On a smaller VPS you can force installation with UADMIN_MAIL_CLAMAV_FORCE=1 on re-apply.
Minimum (auto-skip below this): MemAvailable < 1200 MB AND MemTotal < 2800 MB Recommended: 2 GB+ RAM for mail + rspamd + clamav Force on 2 GB VPS: UADMIN_MAIL_CLAMAV_FORCE=1
-
Installation (new server)
The mail wizard automatically runs the «ClamAV antivirus» step after Rspamd installation. Order: Postfix → Dovecot → Rspamd → ClamAV → Apache/Roundcube → Connector.
-
Existing mail server
After panel OTA to 1.0.400+: Mail → Server overview → Update connector (0.9.5). Then Mail → Settings → Re-apply: ClamAV antivirus. Check Mail → Rspamd → Overview — the ClamAV card should show installed + enabled.
-
Panel management
Mail → Rspamd → Overview: enable/disable scanning, choose action (Reject or Add header only), set max scan size (1–100 MB). Changes write to /etc/rspamd/local.d/antivirus.conf and reload Rspamd.
-
EICAR test
Send a test message with the EICAR test string in the body (plain text). Rspamd should mark CLAM_VIRUS and reject the message if action is reject. Do not use production addresses for experiments — use a test mailbox.
X5O!P%@AP[4\PZX54(P^)7CC)7}-STANDARD-ANTIVIRUS-TEST-FILE!+H*
TipService check on mail VM: systemctl status clamav-daemon clamav-freshclam rspamd; cat /etc/rspamd/local.d/antivirus.conf