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.
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.
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.
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