🛡️ Setting Up ClamAV on SME Server
+-----------------------------------------------------+
| Configuring ClamAV Antivirus |
+-----------------------------------------------------+
Overview
ClamAV is a free antivirus engine used to scan email and files on SME Server. This guide covers installation, database updates, enabling scanning, and troubleshooting common issues.
⚙️ Procedure
1. Check ClamAV status
service clamav status
Ensure the service is installed and running.
2. Update virus database
freshclam
This fetches the latest virus definitions.
Troubleshooting daily updates
If freshclam fails to download updates:
- Check network connectivity and firewall settings.
- Verify DNS resolution and that
freshclamcan reach the ClamAV update servers. - Ensure permissions on
/var/lib/clamavallow updates. - Run manually to see errors:
freshclam --verbose
- Consider temporarily disabling proxies or using the
HTTPProxyServer/HTTPProxyPortoptions in/etc/freshclam.confif needed.
3. Configure scanning
Edit /etc/clamav/clamd.conf or SME Server ClamAV configuration templates. Key settings include:
ArchiveMaxCompressionRatioMaxFilesMaxRecursion
After configuration changes, restart ClamAV:
service clamav restart
4. Enable unofficial signature databases (optional)
Unofficial signatures can enhance detection. Add them as per the Koazali Wiki instructions.
5. Scan files or directories
clamscan -r /path/to/scan
Use -r for recursive scanning. Check logs for infected files.
6. Troubleshooting database updates
- Ensure
freshclamcan access the update server. - Verify permissions on
/var/lib/clamav. - Check log files in
/var/log/clamav/for error details. - If daily download fails, use the manual update procedure above.
📝 Notes & Tips
- Always keep the virus database up-to-date.
- Use SME Server templates where possible to prevent overwriting changes.
- Retro-style ASCII headers are optional but maintain familiarity for long-time JACSoft users.
- Consider automated cron jobs to update ClamAV regularly.