Ubuntu 16.04 and ISPConfig 3.1 - stopping ClamAV
lamAV requires quite a bit of resources to run in the background and this usually slows down the mail delivery. In the ISPConfig 3 (Under Perfect Server setup), clamAV is run within Amavis. Therefore, typical removal of clamAV commands will not remove it.
When RAM is really low, Linux kills amavis and this will cause mail not being delivered. Therefore, if we run amavis to manage anti-virus and spam, consider a minimum of 2G or 4G RAM VM/Cloud servers.
The steps to disable clamav and amavisd are:
(1) edit postfix conf - note amavis uses a special port 10024 and 10026. Therefore, if you are not using these ports, consider closing them in your firewall settings.
nano /etc/postfix/main.cf
# content_filter = amavis:[127.0.0.1]:10024
# receive_override_options = no_address_mappings
(2) Under ISPConfig 3.1, comment additional 2 lines
nano /etc/postfix/tag_as_foreign.re
#/^/ FILTER amavis:[127.0.0.1]:10024
nano /etc/postfix/tag_as_originating.re
#/^/ FILTER amavis:[127.0.0.1]:10026
Save changes and restart postfix
/etc/init.d/postfix restart
(3) stop and disable the services
/etc/init.d/clamav-daemon stop
/etc/init.d/clamav-freshclam stop
/etc/init.d/amavis stop
update-rc.d -f clamav-daemon remove
update-rc.d -f clamav-freshclam remove
update-rc.d -f amavis remove
To restore the changes, do:
update-rc.d clamav-daemon defaults
update-rc.d clamav-freshclam defaults
update-rc.d amavis defaults
The services shall start in the next reboot
(4) Under Ubuntu 16.04 and ISPConfig 3.1, also execute the following commands:
systemctl disable clamav-daemon.socket
systemctl disable clamav-daemon.service
systemctl disable clamav-freshclam.service
Note - The changes in postfix main.cf will get overwitten by an ispconfig software update when you select to "re-configure" services during update, so you should comment out the lines again after you install a ispconfig update.
Thu 22 Apr 2021 11:17:49 PM CEST - permalink -
-
https://kentechnote.blogspot.com/2017/01/ubuntu-1604-and-ispconfig-31-stopping.html