Re: [exim] clamd: unable to connect to UNIX socket /var/run…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: W B Hacker
Date:  
À: exim users
Sujet: Re: [exim] clamd: unable to connect to UNIX socket /var/run/clamav/clamd.ctl (No such file or directory)
Martin Windfuhr wrote:
> Hello,
>
> I can send mails, but don't receive.
>
> /var/log/exim4/mainlog
>
> 2009-02-22 13:11:35 1LbE7K-0001yq-JG malware acl condition: clamd: unable
> to connect to UNIX socket /var/run/clamav/clamd.ctl (No such file or
> directory)
>

*snip*
>
> /var/log/exim4/panic.log
> 2009-02-22 13:11:35 1LbE7K-0001yq-JG malware acl condition: clamd: unable
> to connect to UNIX socket /var/run/clamav/clamd.ctl (No such file or
> directory)
>
>
> ls -la /var/run/clamav
> drwxr-xr-x  2 clamav clamav 4096 Feb 22 13:19 .
> drwxr-xr-x 13 root   root   4096 Feb 22 13:19 ..
> -rw-rw----  1 clamav clamav    5 Feb 22 13:19 freshclam.pid

>
>


Conspicuous by its absence is a socket in that location.

Ex: Mine is in /var/run/clamav/

ls -lFG /var/run/clamav

srwxrwxrwx 1 clamav clamav 0 Feb 21 10:05 .s.CLAMD.7

Note the initial 's'


Same example - the --socketpath in Exim's configure file:

av_scanner      = clamd:/var/run/clamav/.s.CLAMD.7002


====

The ownership and permissions matter, but the name is not important, SO
LONG AS the name and path match in BOTH Exim's configure AND ClamAV's
confgure /and/or startup flags.

What you'll need to do next is find that ClamAV config and/or the
command-tail called on its invocation, and see if it is starting in a
manner that permits it to BOTH clear-out any old socket left from a rude
reboot, AND create a new one - and where Exim expects to meet with it,
of course.

mine is under /usr/local/etc, and has;

# The daemon works in a local OR a network mode.
# Due to security reasons we
# recommend the local mode.

# Path to a local socket file the daemon will listen on.
# Default: disabled
LocalSocket /var/run/clamav/.s.CLAMD.7002

# Remove stale socket after unclean shutdown.
# Default: disabled
FixStaleSocket yes

# TCP port address.
# Default: disabled
# TCPSocket 3310

I suspect you are on Linux, so you'll have to 'map' al of this to
wherever your distro does such things.

Good luck with that part....

Bill