Аntivirus and antispam for mail

Hello, why do not I have such add-ons as antivirus and antispam for mail active, can they somehow be installed additionally, because there are already three sites on the server, and I don’t want to demolish all this.

Currently, changing the modules after installation isnt possible in a easy way. You could try to get the relevant parts out of the installer, but you need to know what you’re doing. Probaly setup a new server and move the content using the backup function could be a better idea.

Also, a modular installer - where you can enable and disable features like bind, ftp, apache2 - is on the to do list.

1 Like

I’ve been noticing the same issues with the 1.4 version with not having anti-virus or anti-spam. I did a complete reimage of the VPS to install hestia 1.4, and the restore worked to import the existing emails with anti-virus and anti-spam, however upon creation of a new site, anti-virus and anti-spam were not there for the new site, but were there for the old(restored) site. So it seems like I’m out of luck? Is it possible to specify only certain restore aspects like web and db so that I can create brand new email domains for each of the sites.

I had an issue where my
ANTISPAM_SYSTEM=‘spamassassin’
ANTIVIRUS_SYSTEM=‘clam’
variables weren’t set in my /usr/local/hestia/conf/hestia.conf file
That meant the boxes to check on the Edit Mail Domain page weren’t showing up, so I couldn’t activate them. Maybe this is what you’re experiencing.
You might successfully use the command line v- commands instead. Its late now, I can explain more in the morning.

Thanks!! That was exactly the issue. I went ahead and edited the /usr/local/hestia/conf/hestia.conf file, and added the two lines:
ANTISPAM_SYSTEM=‘spamassassin’
ANTIVIRUS_SYSTEM=‘clam’
I saved the file, rebooted my server, and sure enough when I got to Edit my Mail Domain, the options for Spam Filter and Anti-Virus are now visible and weren’t checked. I have to wonder if this is a bug somehow. Curious why those two entries would’ve been removed in our cases.

I spoke too soon. From the admin user, it looks like the clam service is running, but the spamassassin service can’t be found.

We have changed the the fact if spam assign / clamav wasn’t installed it should hidden. It doesn’t make sense to show them if they are not installed.

Thank you for your replies. I think the issue was the lack of knowledge that anti virus and anti spam don’t get installed by default. So the previous 1.3x release falsely led me to believe they were there based on the check marks in the mail domain section. With release 1.4 they will show the red x and hide the option to enable them when editing the mail domain because they in fact are not installed. I think i have it all figured out now, now that I know anti virus and anti spam are not enabled during default installs. Which implies they aren’t needed for the average user.

Definitely makes sense. However I was thinking that the variables should still be in the conf file, but set to null if that was the case. eg
ANTISPAM_SYSTEM=‘’

@We_are_PSU I think clam and spamassassin are usually installed by default, although maybe not on low memory systems?
You can check with
systemctl status spamassassin.service
systemctl status clamav-daemon.service

I think you hit the nail on the head. My low memory (1GB VPS) didn’t have them installed by default, but on my higher memory system the default installed the following.

  • NGINX Web / Proxy Server
  • Apache Web Server (as backend)
  • PHP-FPM Application Server
  • Bind DNS Server
  • Exim Mail Server + ClamAV + SpamAssassin
  • Dovecot POP3/IMAP Server
  • MariaDB Database Server
  • Vsftpd FTP Server
  • Firewall (Iptables) + Fail2Ban Access Monitor

ClamAV requires at least 1,5 gb of memory we have just updated so it needs unless you specify it at least 3 gb of memory as 2 gb (what is before still caused issues)

Thank you for specifically pointing out in the code where it checks memory requirements. This answered why AV and spam were not being installed.

Please, I really need to explain v- commands
I am using 1.4.5
Upgrading to the current version according to your regulations excludes the appearance of a checkbox for Antispam and Mail Antivirus for servers with 1GB memory.
My checkbox is gone
Now my VDS has 2GB memory
I installed manually “Spamassasin” “Clamav”

Checked the commands
systemctl status spamassassin.service
systemctl status clamav-daemon.service
Everything is fine

Added to the config file
/usr/local/hestia/conf/hestia.conf

ANTISPAM_SYSTEM=‘spamassassin’
ANTIVIRUS_SYSTEM=‘clam’

And everything is OK

There was a checkbox for installing antispam and antivirus for a mail domain.

Please tell me how to check the configuration correctly so that the anti-spam and anti-virus of the mail domain are configured correctly

ANTISPAM_SYSTEM=‘spamassassin’
ANTIVIRUS_SYSTEM=‘clam’

If those are set the checkbox are present and you should be able to enable anti spam / anti virus via the settings

It’s like that
But unfortunately, an error appeared that points to the configuration file

root@omnibus:~# exim -Mvb 1m14Pc-00020h-Bv
1m14Pc-00020h-Bv-D
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found

This response returns a request to view the message body with the command exim

You should not add /usr/local/hestia/conf/hestia.conf to the clamav / exim config as this format are unable to read…

I’m sorry, one more time.
This error is returned on the command line
We want to read the header of the post:

exim -Mvh 1m14Pc-00020h-Bv

root@omnibus:~# exim -Mvh 1m14Pc-00020h-Bv
1m14Pc-00020h-Bv-H
root 0 0
<root@om*****..ru>
1625652252 0
-received_time_usec .369888
-active_hostname om
.
.ru
-ident root
-received_protocol local
-body_linecount 44
-max_received_linelength 82
-auth_id root
-auth_sender root@om
**..ru
-allow_unqualified_recipient
-allow_unqualified_sender
-local
XX
1
root@om
.***.ru

188P Received: from root by om***..ru with local (Exim 4.93)
(envelope-from <root@om
..ru>)
id 1m14Pc-00020h-Bv
for root@om
..ru; Wed, 07 Jul 2021 13:04:12 +0300
025
From: root (Cron Daemon)
043F From: root@om
*..ru (Cron Daemon)
009
To: root
027T To: root@om
*..ru
083 Subject: Cron <root@om
> sleep 60 && /usr/local/hestia/bin/v-add-sys-sftp-jail
018 MIME-Version: 1.0
040 Content-Type: text/plain; charset=UTF-8
032 Content-Transfer-Encoding: 8bit
028 X-Cron-Env: <SHELL=/bin/sh>
025 X-Cron-Env: <HOME=/root>
033 X-Cron-Env: <PATH=/usr/bin:/bin>
027 X-Cron-Env: <LOGNAME=root>
050I Message-Id: <E1m14Pc-00020h-Bv@om***.***.ru>
038 Date: Wed, 07 Jul 2021 13:04:12 +0300

We want to read the body of the message
#exim -Mvb
Return error
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found

An error is then returned that points to the source.
The source of the error in the config file

hestia.conf

This means that an error in the configuration file Hestia: hestia.conf
Did I break something in the config file hestia.conf ?

You can ask you to publish the original correct config file hestia.conf
where it works Spamassasin and Clamav

hestia.conf should look like:

ANTISPAM_SYSTEM='spamassassin'
ANTIVIRUS_SYSTEM='clamav-daemon'
API_ALLOWED_IP='allow-all'
API='yes'
BACKEND_PORT='8083'
BACKUP_GZIP='3'
BACKUP_MODE='zstd'
BACKUP_SYSTEM='sftp'
CRON_SYSTEM='cron'
DB_PMA_ALIAS='phpmyadmin'
DB_SYSTEM='mysql'
DEBUG_MODE='false'
DISK_QUOTA='no'
DNS_CLUSTER='yes'
DNS_SYSTEM='bind9'
ENFORCE_SUBDOMAIN_OWNERSHIP='yes'
FILE_MANAGER='true'
FIREWALL_EXTENSION='fail2ban'
FIREWALL_SYSTEM='iptables'
FTP_SYSTEM=''
IMAP_SYSTEM='dovecot'
INACTIVE_SESSION_TIMEOUT='60'
LANGUAGE='en'
LE_STAGING='no'
LOGIN_STYLE='default'
MAIL_SYSTEM='exim4'
PHPMYADMIN_KEY='QaBJLLQVV2LxvGLR'
PLUGIN_APP_INSTALLER='true'
POLICY_SYSTEM_ENABLE_BACON='false'
POLICY_SYSTEM_HIDE_SERVICES='no'
POLICY_SYSTEM_PASSWORD_RESET='no'
POLICY_SYSTEM_PROTECTED_ADMIN='no'
POLICY_USER_CHANGE_THEME='true'
POLICY_USER_DELETE_LOGS='yes'
POLICY_USER_EDIT_DETAILS='yes'
POLICY_USER_EDIT_DNS_TEMPLATES='yes'
POLICY_USER_EDIT_WEB_TEMPLATES='true'
POLICY_USER_VIEW_LOGS='true'
POLICY_USER_VIEW_SUSPENDED='no'
PROXY_PORT='80'
PROXY_SSL_PORT='443'
PROXY_SYSTEM='nginx'
RELEASE_BRANCH='release'
RRD_IFACE_EXCLUDE='lo,eno1,eno2,eno4'
STATS_SYSTEM='awstats'
THEME='dark'
UPDATE_HOSTNAME_SSL='yes'
UPGRADE_SEND_EMAIL_LOG='false'
UPGRADE_SEND_EMAIL='true'
VERSION='1.4.5'
WEB_BACKEND='php-fpm'
WEBMAIL_ALIAS='webmail'
WEBMAIL_SYSTEM='roundcube'
WEB_PORT='8080'
WEB_RGROUPS='www-data'
WEB_SSL='mod_ssl'
WEB_SSL_PORT='8443'
WEB_SYSTEM='apache2'

Thank you, everything is just like your example.
Where is the error given then

Tell me from what problem you need to look for the effect if there is an error message in the configuration file

root@omnibus:~# exim -Mvb 1m14Pc-00020h-Bv
1m14Pc-00020h-Bv-D
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 4: ANTIVIRUS_SYSTEM: command not found
/usr/local/hestia/conf/hestia.conf: line 3: ANTISPAM_SYSTEM: command not found

This message in the console