HestiaCP is unable to identify the ClamAV-Daemon

Hello everyone, I hope you’re doing well. I come from VestaCP and I’m in the process of migrating a total of 16 servers for the first time. Previously, I used CentOS 7, and now I’m migrating to Debian 12.5.

I’m facing a somewhat tricky problem to solve.

The ClamAV-Daemon is functioning normally, as you can see in the image below. However, in the HestiaCP panel, it appears in red, indicating that the service is not functional.

To address this initial step, I went to the file that identifies the running services:

vim /usr/local/hestia/bin/v-list-sys-services

And I added the code on line 219:

get_srv_state “$ANTIVIRUS_SYSTEM” “$proc_name”

So, it works normally. The problem is that I can’t pause or restart it via the Hestia panel.

I’m definitely going down the wrong path. Has anyone managed to solve this problem?

Note: I’m using a server with 32 GB of memory. I’ve heard reports that it might stop due to memory shortage caused by a cron job.

There’s nothing special in the log either.

Thank you all for your attention.

1 Like

You can participate in the development of Hestia’s panel and contribute your strength! Why are you speaking out silently here? Is there a personal documentation site? It is convenient to record the errors and solutions of using Hestia.

This is really cool! To be honest, I’ve never participated in something like this before. I’ll contribute whatever I can through Git. :slight_smile:

Looking forward to your contribution to the community! What is your GitHub account? I want to follow you!

If you are using Ubuintu/Debian that is the command that should be used. Do you have a dir /etc/sysconfig?

Yes, I do. These are the files I have in the folder.

ip6tables-custom iptables iptables4-jelastic iptables6-jelastic network

At the moment, I don’t have a GitHub account yet, but I’ll create one later this week.

I have developed a new program called Sentinela to make my daily work easier. Currently, I have 15,000 emails and a very high demand at my job. So, I created a shell script to help manage everything. The idea is to make it available to you as soon as I finish testing it here. I use Debian along with HestiaCP, so initially, this is the target audience, but the community can help with development and modify it as needed.

Here are the basic features:

Rate Limit Monitor

  • Monitors and suspends emails with a rate limit of 2 (customizable), tracking a 24-hour log.
  • Creates a count list, where the blocking time for an email increases as it continues to be blocked.

Service Checker

  • Sends an email at a specific time showing which services are up and running.

MySQL Backup

  • Performs a backup of all MySQL tables and places them in a specific folder with the date, automatically deleting backups older than 30 days.

Exim

  • Cleans the Exim queue every day at a specified time.
  • Deletes emails older than 90 days from the spam and trash folders.

Sieve

  • Fixes Sieve errors for new users by configuring Sieve settings for all new users.

Mail Size Configuration

  • Ensures all email size configurations are correct, setting the maximum send and receive size to 25MB, and adjusts Roundcube email responses to match the defined value in Roundcube.

Exim SMS Alert

  • Sends an SMS if the Exim queue exceeds 200 emails.

And that is the reason clamav service wasn’t shown as up and running in Hestia. That dir is not a default dir neither for Debian nor Ubuntu and Hestia checks the existence of that dir to use one or another check.

# Checking MAIL ANTIVIRUS
if [ -n "$ANTIVIRUS_SYSTEM" ] && [ "$ANTIVIRUS_SYSTEM" != 'remote' ]; then
        if [ -d "/etc/sysconfig" ]; then
                if [ "$ANTIVIRUS_SYSTEM" == 'clamav' ]; then
                        ANTIVIRUS_SYSTEM='clamd'
                fi
                get_srv_state "$ANTIVIRUS_SYSTEM"
        else
                if [ "$ANTIVIRUS_SYSTEM" == 'clamav-daemon' ]; then
                        proc_name='clamd'
                fi
                get_srv_state "$ANTIVIRUS_SYSTEM" "$proc_name"
        fi
        data="$data\nNAME='$ANTIVIRUS_SYSTEM' SYSTEM='email anti-virus'"
        data="$data STATE='$state' CPU='$cpu' MEM='$mem' RTIME='$rtime'"
        proc_name=''
fi

Ok, Sahsanu. I will check this. This came as a default in my installation.

1 Like

Very good

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.