Trying to make milter see the clam daemon but can't figure out what's wrong.  
CentOS7.

In /etc/clamd.d/clamd.conf:
LocalSocket /var/run/clamd.scan/clamd.sock
LocalSocketGroup virusgroup
LocalSocketMode 660
FixStaleSocket yes

... at which point I found that Yum hadn't installed the socket for some 
reason, so:
# mkdir /var/run/clamd.scan/
# python -c "import socket as s; sock = s.socket(s.AF_UNIX); 
sock.bind('/var/run/clamd.scan/clamd.sock')"
# chown -R root:virusgroup /var/run/clamd.scan && chmod -R 660 
/var/run/clamd.scan

(user clamilt is also in virusgroup)

In /etc/mail/clamav-milter.conf:
ClamdSocket unix:/var/run/clamd.scan/clamd.sock

# ll /var/run/clamd.scan/clamd.sock
srw-rw----. 1 root virusgroup 0 Nov  6 14:56 /var/run/clamd.scan/clamd.sock

... and yet in journalctl -xe:
Nov 06 15:01:01 quantum.localdomain systemd[1]: Starting Session 12 of user 
root.
-- Subject: Unit session-12.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-12.scope has begun starting up.
Nov 06 15:01:02 quantum.localdomain run-parts(/etc/cron.hourly)[3324]: starting 
0anacron
Nov 06 15:01:02 quantum.localdomain run-parts(/etc/cron.hourly)[3330]: finished 
0anacron
Nov 06 15:01:39 quantum.localdomain clamav-milter[3310]: No clamd server 
appears to be available
Nov 06 15:01:39 quantum.localdomain clamav-milter[3310]: WARNING: No clamd 
server appears to be available
Nov 06 15:02:09 quantum.localdomain freshclam[3333]: ClamAV update process 
started at Mon Nov  6 15:02:09 2017
Nov 06 15:02:09 quantum.localdomain freshclam[3333]: main.cld is up to date 
(version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Nov 06 15:02:10 quantum.localdomain freshclam[3333]: Downloading 
daily-24020.cdiff [100%]
Nov 06 15:02:14 quantum.localdomain freshclam[3333]: daily.cld updated 
(version: 24020, sigs: 1772767, f-level: 63, builder: neo)
Nov 06 15:02:14 quantum.localdomain freshclam[3333]: bytecode.cld is up to date 
(version: 316, sigs: 75, f-level: 63, builder: raynman)
Nov 06 15:02:16 quantum.localdomain freshclam[3333]: Database updated (6339091 
signatures) from database.clamav.net (IP: 69.12.162.28)
Nov 06 15:02:38 quantum.localdomain clamav-milter[3310]: No clamd server 
appears to be available
Nov 06 15:02:38 quantum.localdomain clamav-milter[3310]: WARNING: No clamd 
server appears to be available
Nov 06 15:03:38 quantum.localdomain clamav-milter[3310]: No clamd server 
appears to be available
Nov 06 15:03:38 quantum.localdomain clamav-milter[3310]: WARNING: No clamd 
server appears to be available
Nov 06 15:04:38 quantum.localdomain clamav-milter[3310]: No clamd server 
appears to be available
Nov 06 15:04:38 quantum.localdomain clamav-milter[3310]: WARNING: No clamd 
server appears to be available
Nov 06 15:05:38 quantum.localdomain clamav-milter[3310]: No clamd server 
appears to be available
Nov 06 15:05:38 quantum.localdomain clamav-milter[3310]: WARNING: No clamd 
server appears to be available
Nov 06 15:06:07 quantum.localdomain nice[3295]: SelfCheck: Database 
modification detected. Forcing reload.
Nov 06 15:06:32 quantum.localdomain nice[3295]: Reading databases from 
/var/lib/clamav
Nov 06 15:06:37 quantum.localdomain clamav-milter[3310]: No clamd server 
appears to be available
Nov 06 15:06:37 quantum.localdomain clamav-milter[3310]: WARNING: No clamd 
server appears to be available
Nov 06 15:06:45 quantum.localdomain nice[3295]: Database correctly reloaded 
(6473680 signatures)
Nov 06 15:07:37 quantum.localdomain clamav-milter[3310]: No clamd server 
appears to be available
Nov 06 15:07:37 quantum.localdomain clamav-milter[3310]: WARNING: No clamd 
server appears to be available
Nov 06 15:08:37 quantum.localdomain clamav-milter[3310]: No clamd server 
appears to be available
Nov 06 15:08:37 quantum.localdomain clamav-milter[3310]: WARNING: No clamd 
server appears to be available
Nov 06 15:08:57 quantum.localdomain chronyd[554]: Source 208.76.1.123 replaced 
with 69.89.207.199
Nov 06 15:09:37 quantum.localdomain clamav-milter[3310]: No clamd server 
appears to be available
Nov 06 15:09:37 quantum.localdomain clamav-milter[3310]: WARNING: No clamd 
server appears to be available
Nov 06 15:10:37 quantum.localdomain clamav-milter[3310]: No clamd server 
appears to be available
Nov 06 15:10:37 quantum.localdomain clamav-milter[3310]: WARNING: No clamd 
server appears to be available
Nov 06 15:11:37 quantum.localdomain clamav-milter[3310]: No clamd server 
appears to be available
Nov 06 15:11:37 quantum.localdomain clamav-milter[3310]: WARNING: No clamd 
server appears to be available
Nov 06 15:12:37 quantum.localdomain clamav-milter[3310]: No clamd server 
appears to be available
Nov 06 15:12:37 quantum.localdomain clamav-milter[3310]: WARNING: No clamd 
server appears to be available
Nov 06 15:12:50 quantum.localdomain polkitd[550]: Registered Authentication 
Agent for unix-process:3354:904237 (system bus name :1.65 [/usr/bin/pkttyagent 
--notify-fd 5 --fallback], object path 
/org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF
Nov 06 15:12:50 quantum.localdomain systemd[1]: Stopping Milter module for the 
Clam Antivirus scanner...
_______________________________________________
clamav-users mailing list
clamav-users@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

Reply via email to