Error

# service clamd status

clamd dead but subsys locked

cp /var/lock/subsys/clamd /root/f

cp /var/run/clamav/clamd.sock /root/f

cp /var/run/clamav/clamd.sock /root/f

cp /var/run/clamav/clamd.pid /root/f

rm -rf /var/lock/subsys/clamd 

rm -rf /var/run/clamav/clamd.sock 

rm -rf /var/run/clamav/clamd.sock 

rm -rf /var/run/clamav/clamd.pid

[root@mail f]# service clamd restart

               service clamd status

clamd (pid 1620) is running...

                            ----------------------------------

]# amavisd-release virus-wfzVDLDYqifA.gz

Can't connect to UNIX socket /var/spool/amavisd/amavisd.sock: No such file or directory at /usr/bin/amavisd-release line 270.

In amavisd-release $socketname is set to '/var/amavis/amavisd.sock'; by default. please fix it to the correct /var/lib/amavis/amavisd.sock

after fixing to /var/lib/amavis/amavisd.sock amavsid-release works again.

# cp /usr/sbin/amavisd /usr/sbin/amavisd.BK 

# vi /usr/sbin/amavisd 

 870   # $unix_socketname = '/var/amavis/amavisd.sock';  # e.g. milter or release

         $unix_socketname = '/var/lib/amavis/amavisd.sock';

 12380 # how to test:  $ socat stdio unix-connect:/var/amavis/amavisd.sock,crnl

 --------

But should that not be covered by the conffile:

  /etc/amavis/conf.d/25-amavis_helpers:$unix_socketname = "/var/lib/amavis/amavisd.sock";

-----