Guys, I need your help, please.

I have read that this is Clamav antivirus, but in mailcow.conf the skip_clamav set to y
How can I get rid of it? i have tried even to kill the process by using pkill clamd, it killed and immediacy return back.

Please take it down?

Redirecting...

:
ClamAV and Solr can be greedy with RAM. You may disable them in mailcow.conf by settings SKIP_CLAMD=y and SKIP_SOLR=y.

Beside that, antivirus scanning probably wouldn’t hurt, so disabling at your own risk.

    Have something to say?

    Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

    pkernstock
    Thanks for the reply, but it didn’t help.

    I clarify already that I have disabled this both by typing y in the conf file and restarting, but still, this clamd appears and eating all the memory.

    • MAGIC

      • Forum Staff
      • volunteer
      Moolevel 48

    Can you do a down && up -d rather than a restart?

      MAGIC Can you please be more detailed?
      Exactly the commands I should run would be nice.

      docker-compose down
      docker-compose up -d

      The mailcow.conf/.env will only read when interacting with the stack. Then the clamav container is still started, but clamd itself won’t.

        pkernstock MAGIC
        I did it. and didn’t help.
        What weird is that even if I type just docker-compose down this clamd process is still there, it might be another thing? because I set up a new droplet via digital ocean without any extra.

        a year later

        My solution to this is to execute the following bash script after each docker-compose up -d. You could also run this on a schedule using crontab.

        The script below essentially just finds any containers with “clamd” and “solr” as string in the name, and does 3 things:

        1) Updates container restart policy to OFF (optional and useful command if you need it)
        2) Stop the containers (required before deleting)
        3) Delete containers

        Here’s the script.

        #!/usr/bin/env bash
        
        docker update --restart no $(docker container ls -q -f "name=clamd")
        docker update --restart no $(docker container ls -q -f "name=solr")
        
        docker container stop $(docker container ls -q -f "name=clamd")
        docker ps -a | grep "clamd" | awk '{print $1}' | xargs docker rm
        
        docker container stop $(docker container ls -q -f "name=solr")
        docker ps -a | grep "solr" | awk '{print $1}' | xargs docker rm

        To return everything back to normal, simply just run:

        docker-compose up -d

        15 days later

        Setting SKIP_CLAMD=y and SKIP_SOLR=y does definitely prevent these from running, though the containers are still present.

        You’ll see from logs that the relevant processes aren’t started:
        clamd-mailcow_1 | SKIP_CLAMD=y, skipping ClamAV...
        solr-mailcow_1 | SKIP_SOLR=y, skipping Solr...

        And then their resource usage will be minimal - 0% CPU and 1M of RAM each in my case.
        So there’s effectively no need to modify the container run behaviour either way

        No one is typing