I want to setup a remote server that runs clamav and spamassassin. I followed this guide to setup the server exactly as prescribed but when I send a mail to an account on my server, I get this error in the logs
ERROR: Could not connect to clamd on [IP of ClamAV Server]: No route to host
and same error is returned by spamd. I have opened port 783 and 3310 in the firewall and in webmin’s Firewalld as well on both servers.
Silly me. I didn’t reload FirewallD after adding the rules. After reload, the connection can be established for spamd however clamav is stil not working.
telnet [IP of server] 3310 returns error “Connection refused”.
According to the instructions in the guide that I linked to, I setup a fresh server (ubuntu 24.04) and installed virtualmin on it. And did the changes in clamd.conf.
Can you please tell me how I can diagnose this issue?
I’m only aware of 2 firewalls, one is the cloud one (provided by Linode) and other is FirewallD in Virtualmin. On both, I have opened 783 and 3310 ports. And like I said, spamd is working. Is there any other firewall on a fresh install?
I believe you are still on a socket and not port 3310.
This is my Debian clam.conf, well top of it.
#Automatically Generated by clamav-daemon postinst
#To reconfigure clamd run #dpkg-reconfigure clamav-daemon
#Please read /usr/share/doc/clamav-daemon/README.Debian.gz for details
LocalSocket /var/run/clamav/clamd.ctl
FixStaleSocket true
LocalSocketGroup clamav
LocalSocketMode 666
# TemporaryDirectory is not set to its default /tmp here to make overriding
# the default with environment variables TMPDIR/TMP/TEMP possible
I think we need to see your modified file on the second machine. Note, I am running on a socket, not a port.
My guess is that since the socket is created first, that is what is used. My guess, and it is only a guess, is that it would work if you comment out the first 4 lines. It looks like that is where the socket is created.
I then tried this (see last post) on another fresh install - lets call it server 3 - and now I seem to have clamd listening on 3310.
On my original server that needs to use clamd, I entered the IP address of server 3 and it has accepted it. I rechecked virtualmin configuration and it reports that clamav is installed and running.
@Jamie@Joe Guys, can you please check if this guide is up to date for Ubuntu 24 and are these the only steps required to make clamav work on a remote server? Or is there something missing or implied?
I ask because there were differences in spam assassin’s instructions but I got it working fairly easily. Clamav is giving a lot of pain though. I’ve done these on fresh installs but its not working.