0

I can't seem to figure out a problem after a few hours of trouble-shooting and looking for similar cases.

Like ohter email servers in the exact same configuration, the affected one is based on CentOS 7 running Postfix with Amavisd-new and ClamAV (besides the more or less irrelevant parts such as Dovecot, SpamAssassin and so on which all still work).

The problem consists of amavis all of a sudden not being able to connect to clamd anymore because the socket doesn't exist:

connect to /var/run/clamd.amavisd/clamd.sock failed, attempt #1: Can't connect to a UNIX socket /var/run/clamd.amavisd/clamd.sock: No such file or directory

The directory is always created by a tmpfiles.d entry of amavisd and has the correct user/group and labeling set:

drwxrwx---. amavis clamupdate system_u:object_r:antivirus_var_run_t:s0 clamd.amavisd

The relevant section in /etc/amavisd/amavisd.conf as well as /etc/clamd.d/amavisd.conf share the same sock option and clamd runs as user amavis:

grep clamd.sock /etc/clamd.d/amavisd.conf /etc/amavisd/amavisd.conf

/etc/clamd.d/amavisd.conf: LocalSocket /var/run/clamd.amavisd/clamd.sock

/etc/amavisd/amavisd.conf: \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamd.amavisd/clamd.sock"],

SELinux has antivirus_can_scan_system and clamd_use_jit on and was disabled by way of trial.

I tried manually creating the socket, creating an instantiated unit as [email protected] as well as completely removing ClamAV and reinstalling it:

clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd

Now I've run out of ideas and therefore would like to aks if anyone came across this scenario and could have some tips.

I look forward to your thoughts. :-) Cora

2 Answers 2

-1

systemctl daemon-reload followed by systemctl start clamd@amavisd worked in my case.

1
  • Hi Arno, thank you for your suggestion. :-) I tried that, multiple times in congestion with the other things i tried including full system reboots.
    – cora
    Jul 31, 2019 at 21:21
-1

Stop your amavisd service, start manually clamd@scan and clamd@amavisd. Then restart amavisd

systemctl stop amavisd
systemctl start clamd@amavisd
systemctl start clamd@scan
systemctl start amavisd
1
  • Hi tetipyo, thank you for your idea. I assumed that the depth of my initial post implies that easy solutions have already been tried. I appologize if that wasn't clear.
    – cora
    Oct 20, 2019 at 15:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .