You are not logged in.
Hi all,
I don't seem to be able to fix this myself, despite going over my configuration over and over again, and Googling for solutions, I know similar questions have been asked before, but I do *believe* I have everything set up as it should be, but still... Hopefully someone can shed a light on this.
I have a mail server set up with Postfix, Dovecot, Pigeonhole, Spamassasin and Clamav, as per the wiki's, which works like a charm if it wasn't for one thing. Although there are no corresponding errors to be found in the logs, all incoming mail show this in the header:
X-Spam-Virus: Error (Cannot connect to unix socket
'/var/lib/clamav/clamd.sock': connect: Permission denied)
The .sock file does exist, although it isn't created by itself but had to be created manually, as per https://wiki.archlinux.org/index.php/Cl … T_notified:
marco@xxxxx /var/lib/clamav $ ls -l
total 454136
-rw-r--r-- 1 clamav clamav 951808 Aug 9 04:15 bytecode.cld
-rw-r--r-- 1 clamav clamav 0 Nov 26 14:37 clamd.sock
-rw-r--r-- 1 clamav clamav 156574208 Nov 26 09:42 daily.cld
-rw-r--r-- 1 clamav clamav 307499008 Jun 8 2017 main.cld
-rw------- 1 clamav clamav 2080 Nov 26 14:35 mirrors.dat
And yes, I have set the correct socket location in /etc/clamav/clamd.conf:
LocalSocket /var/lib/clamav/clamd.sock
And in /etc/mail/spamassassin/clamav.pm too:
our $CLAMD_SOCK = "/var/lib/clamav/clamd.sock";
Of course, clamav (and freshclam) run with user clamav:
clamav 323 0.0 0.2 47756 9108 ? Ss 14:34 0:00 /usr/bin/freshclam -d --foreground=true
clamav 1065 0.4 18.5 728420 568792 ? Ssl 14:39 0:08 /usr/sbin/clamd --foreground=true
So the question is, why the "permission denied"? Is the socket not right? Does spamassassin not have the rights (although I tried this by temporarily adding the spamd user to the clamav group)? Maybe it's staring me in the face, but I don't see it.
System is Arch (of course!), everything up to date (clamav 0.100.2-2, spamassassin 3.4.2-1, postfix 3.3.1-4, dovecot 2.3.4-1, etc...)
Any insights are more than welcome!
Thanks,
Marco
Last edited by Crouze (2018-11-26 16:40:17)
Offline
Okay...found it!
The problem was indeed the (non) creation of the .sock file. By default clamd did create a .sock file but not in the location I expected. I had to modify /usr/lib/systemd/system/clamav-daemon.socket
and adjust ListenStream to /var/lib/clamav/clamd.sock. All makes sense.
Maybe the wiki https://wiki.archlinux.org/index.php/Cl … T_notified should be appended to include this? It certainly got me on the wrong foot (thinking "I'll create this sock file myself as instructed, and that will be just fine").
Cheers,
Marco
Offline