CentOS 8 amavisd.conf update issue

Discussion in 'Tips/Tricks/Mods' started by jnewman67, Nov 2, 2022.

  1. jnewman67

    jnewman67 Active Member HowtoForge Supporter

    ran YUM updates and then ispconfig_update.sh on my Perfect CentOS 8 server yesterday ( -> 3.2.8p2), rebooted, and got the following message when mail started flowing again.
    Code:
    Nov  2 10:07:28 dns2 amavis[497464]: (497464-08) (!)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
    I've seen something similar before, but it was related to an actual ClamAV configuration issue (https://forum.howtoforge.com/threads/perfect-server-centos-8-clamav-issues.87574), and I checked that, and it wasn't the problem, so I started poking around. Turns out that either the new version of amavis (amavis-2.12.1-5.el8.noarch) has changed their default socket location (the /etc/amavisd/amavisd.conf file had been replaced/updated), or ISPConfig missed that the config file had been changed and didnt update the config file to point to where it had been last (not sure if it does that or not). or maybe there's difference between clamav and amavisd that has been introduced.
    In any case, here's what I had to fix to get it working again. in /etc/amavisd/amavisd.conf, change the line
    Code:
    ['ClamAV-clamd',
         \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamd.amavisd/clamd.sock"],
    to
    Code:
    ['ClamAV-clamd',
         \&ask_daemon, ["CONTSCAN {}\n", "/var/spool/amavisd/clamd.sock"],
    and save. restart mail services:
    Code:
    systemctl stop amavisd.service
    systemctl stop [email protected]
    systemctl start [email protected]
    systemctl start amavisd.service
    
    and it started working again without errors
    Thanks for the past help Till - it's what pointed me in the direction to find this resolution.
     

Share This Page