Disable Clamav-Deamon not possible?

Ronny

Well-Known Member
Sep 12, 2017
59
3
48
40
Hello,

for an internal mail-relay i do not need the Virus-Checks with Clamav.
and i save some memory.

So i just disabled this service with:
# systemctl disable clamav-daemon.service

But after an hour the clamav-daemon starts again :(

i'm wrong with my solution?
any suggestions?

(i've installed pmg in LXC)

thanks a lot
 
Hi,

you can try to disable the ClamAV checks for pmg:
Code:
pmgsh set /config/admin --clamav 0
pmgconfig sync --restart 1

Greetz
 
sorry:

after the "pmg-hourly.service"-run at 10:00 the clamavd starts again

/var/log/syslog says:

Feb 21 10:00:00 mail systemd[1]: pmg-hourly.service: Failed to reset devices.list: Operation not permitted
Feb 21 10:00:00 mail systemd[1]: pmg-hourly.service: Failed to set invocation ID on control group /system.slice/pmg-hourly.service, ignoring: Operation not permitted
Feb 21 10:00:00 mail systemd[1]: Starting Hourly Proxmox Mail Gateway activities...
Feb 21 10:00:01 mail systemd[1]: Reloading Proxmox Mail Gateway Policy Daemon.
Feb 21 10:00:01 mail systemd[1]: Reloaded Proxmox Mail Gateway Policy Daemon.
Feb 21 10:00:01 mail pmgpolicy[418]: Received a SIG HUP
Feb 21 10:00:01 mail pmgpolicy[418]: 2019/02/21-10:00:01 Server closing!
Feb 21 10:00:01 mail pmgpolicy[418]: 2019/02/21-10:00:01 Re-exec server during HUP
Feb 21 10:00:02 mail pmgpolicy[418]: WARNING: Pid_file created by this same process. Doing nothing.
Feb 21 10:00:02 mail pmgpolicy[418]: WARNING: Pid_file created by this same process. Doing nothing.
Feb 21 10:00:02 mail pmgpolicy[418]: 2019/02/21-10:00:02 main (type Net::Server::preForkSimple) starting! pid(418)
Feb 21 10:00:02 mail pmgpolicy[418]: Binding open file descriptors
Feb 21 10:00:02 mail pmgpolicy[418]: Binding to TCP port 10022 on host 127.0.0.1 with IPv4
Feb 21 10:00:02 mail pmgpolicy[418]: Reassociating file descriptor 5 with TCP on [127.0.0.1]:10022, using IPv4
Feb 21 10:00:02 mail pmgpolicy[418]: Group Not Defined. Defaulting to EGID '0'
Feb 21 10:00:02 mail pmgpolicy[418]: User Not Defined. Defaulting to EUID '0'
Feb 21 10:00:02 mail pmgpolicy[418]: Setting up serialization via flock
Feb 21 10:00:02 mail pmgpolicy[418]: Policy daemon (re)started
Feb 21 10:00:02 mail pmgpolicy[418]: Beginning prefork (5 processes)
Feb 21 10:00:02 mail pmgpolicy[418]: Starting "5" children
Feb 21 10:00:03 mail systemd[1]: clamav-daemon.service: Failed to reset devices.list: Operation not permitted
Feb 21 10:00:03 mail systemd[1]: clamav-daemon.service: Failed to set invocation ID on control group /system.slice/clamav-daemon.service, ignoring: Operation not permitted
Feb 21 10:00:03 mail systemd[1]: Starting Clam AntiVirus userspace daemon...
Feb 21 10:00:03 mail mkdir[17422]: /bin/mkdir: cannot create directory '/run/clamav': File exists
Feb 21 10:00:03 mail systemd[1]: Started Clam AntiVirus userspace daemon.
Feb 21 10:00:03 mail systemd[1]: Started Hourly Proxmox Mail Gateway activities.
Feb 21 10:00:03 mail clamd[17424]: Received 0 file descriptor(s) from systemd.
Feb 21 10:00:03 mail clamd[17424]: clamd daemon 0.100.2 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Feb 21 10:00:03 mail clamd[17424]: Running as user clamav (UID 108, GID 114)
Feb 21 10:00:03 mail clamd[17424]: Log file size limited to 4294967295 bytes.
Feb 21 10:00:03 mail clamd[17424]: Reading databases from /var/lib/clamav/
Feb 21 10:00:03 mail clamd[17424]: Not loading PUA signatures.
 
I'll try to reproduce that - In the meantime - make sure that the clamav-freshclam service is disabled as well!
 
took a quick look at the code - (re)moving the clamav-configs should prevent the pmg stack from starting clamav - please verify!
Thanks!
 
The clamav config is in /etc/clamav/clamd.conf and freshclam.conf

I have not tried to remove it in order to check if this indeed does disable clamav from starting
 
The clamav config is in /etc/clamav/clamd.conf and freshclam.conf

I have not tried to remove it in order to check if this indeed does disable clamav from starting
I have done this ,
I hope that it will be fine.
If it's fail to do it , I will ask again for solution.

Best Regards ,
Koby Peleg Hen.
 
masking the clamav-daemon and clamav-freshclam services should work:
Code:
systemctl mask clamav-daemon.service clamav-freshclam.service
 
I did that , now I wait few days and check this out.
Hello Guys,
After few days of testing ,
I can say that the following solution which is :
Code:
systemctl mask clamav-daemon.service clamav-freshclam.service
Does work as expected.
I can see this case as solved.

Best Regards ,
Koby Peleg Hen
 
  • Like
Reactions: Stoiko Ivanov
Thanks for confirming that it works!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!