clamav-milter issues after debian update

  • Hi Nuxwin ,


    You are right. I found the README file in the directory of the plugin.


    After restarting the clamav-daemon and the clamav-milter:


    Output of ls -la /run/clamav:

    Code
    1. ls -la /run/clamav
    2. total 4
    3. drwxr-xr-x 2 clamav root 80 Sep 11 17:34 .
    4. drwxr-xr-x 33 root root 1200 Sep 11 17:29 ..
    5. -rw-r--r-- 1 clamav root 5 Sep 11 17:34 clamav-milter.pid
    6. srw-rw-rw- 1 clamav clamav 0 Sep 11 17:34 clamd.ctl


    Output of ls -la /var/spool/postfix/clamav:

    Code
    1. ls -la /var/spool/postfix/clamav
    2. total 8
    3. drwxr-xr-x 2 clamav root 4096 Sep 11 17:34 .
    4. drwxr-xr-x 22 root root 4096 Apr 29 00:29 ..
    5. srw-rw-rw- 1 clamav clamav 0 Sep 11 17:34 clamav-milter.ctl


    Output of cat /etc/clamav/clamd.conf:


    Output of cat /etc/clamav/clamav-milter.conf:


    The weird thing now is:


    The previous problem described by fulltilt and myself does not show again after the current restart, but did before. See:




    Output of tail -f /var/log/clamav/clamav-milter.log after the update until now:

    Code
    1. tail -f /var/log/clamav/clamav-milter.log
    2. Wed Sep 11 02:00:19 2019 -> WARNING: No clamd server appears to be available
    3. Wed Sep 11 02:15:53 2019 -> +++ Started at Wed Sep 11 02:15:53 2019
    4. Wed Sep 11 02:15:53 2019 -> WARNING: No clamd server appears to be available
    5. Wed Sep 11 02:16:52 2019 -> WARNING: No clamd server appears to be available
    6. Wed Sep 11 02:45:07 2019 -> +++ Started at Wed Sep 11 02:45:07 2019
    7. Wed Sep 11 02:45:07 2019 -> WARNING: No clamd server appears to be available
    8. Wed Sep 11 17:32:46 2019 -> +++ Started at Wed Sep 11 17:32:46 2019
    9. Wed Sep 11 17:32:46 2019 -> WARNING: No clamd server appears to be available
    10. Wed Sep 11 17:34:33 2019 -> +++ Started at Wed Sep 11 17:34:33 2019


    The latest restart at 17:34:33 2019 - right before I started to check everything again - seems to fixed the problem itself, because the previous error WARNING: No clamd server appears to be available isn't there anymore.

    Edited once, last by freedom: Fixed copy paste from clamav-milter.conf ().

  • fulltilt   freedom


    I've juste tested the behavior under Debian Stretch. The problem seem to be related to the /run/clamav/clamd.ctl socket file which make very long time to be created and so, when the clamav-milter service is being started, the /run/clamav/clamd.ctl socket file is not found, leading to the "WARNING: No clamd server appears to be available" message, and possibly other error messages.


    Basically put:



    Code
    1. root@phpswitcher:~# ls /run/clamav
    2. clamav-milter.pid

    As you can see here, the clamav-daemon is running but the /run/clamav/clamd.ctl socket file is not created yet....


    However, after few seconds:


    Code
    1. root@phpswitcher:~# ls /run/clamav
    2. clamav-milter.pid clamd.ctl


    Problem is that the clamav-milter service, is started just after the clamav-damon service but at this time, the /run/clamav/clamd.ctl socket file has not been created yet...


    Well, this has nothing to do with the plugin in fact... I need investigate further to know why the /run/clamav/clamd.ctl socket file creation is so long...

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • freedom


    Your /etc/clamav/clamav-milter.conf configuration file is totally wrong... It look like the content of the /etc/clamav/clamd.conf configuration file... Did you do a wrong copy past or? Content, when the i-MSCP ClamAV plugin is activated, should be:

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Nuxwin


    I copy pasted the same content, my fault. I fixed the output above.


    Correct output of cat /etc/clamav/clamav-milter.conf is:


    And yes. The clamav plugin is installed and activated in i-mscp. It seems to work without any problems now. But I can confirm, that the clamav package update changed something in the config, it was displayed in the apt upgrade process. I think it was the milter configuration file.


    I can see that your clamav-milter.conf is different from mine.

  • fulltilt   freedom


    See below to know why the socket file is very long to be created:


    Code
    1. root@phpswitcher:~# service clamav-daemon stop


    Code
    1. root@phpswitcher:~# /usr/sbin/clamd --foreground=false --debug
    2. root@phpswitcher:~# pkill -KILL -f /usr/sbin/clamd


    A the same time on another console:


    Basically put, loading signatures is very long process (~40 seconds)... And the socket file will not be created before...

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • And yes. The clamav plugin is installed and activated in i-mscp. It seems to work without any problems now. But I can confirm, that the clamav package update changed something in the config, it was displayed in the apt upgrade process. I think it was the milter configuration file.


    I can see that your clamav-milter.conf is different from mine.

    Yes, the plugin is working as expected. There is only the problem of the clamd socket file that is very long to be created as explained in my previous messages... That's a big problem because I don't know how we can delay the start of the clamav-milter service till that the clamd socket file is effectively created...


    You milter conffile seem to be same as me ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Nuxwin

    Added the Label not i-MSCP related