ClamAV update schedule

NethServer Version: 7.8.2003
Module: clamd

How do I change the clamav update frequency?

Updating the clamav database every hour seems excessive (to me). The frequent updates are causing my mail server to soft reject messages. The messages eventually get delivered, but the clamav update frequency is adding delays to email being delivered.

I would prefer to change the update schedule to 12hrs, or better still, have a method to change the update frequency from the Cockpit GUI.

many thanks
Bob

The update is executed by a cronjob /etc/cron.d/clamav-update. It’s not templated, just edit it to set your custom update frequency.

Thank you @mrmarkuz
/etc/cron.d/clamav-update drives freshclam, which updates the official signature database every 3hrs.
/etc/cron.d/clamav-unofficial-sigs drives the unofficial signature database every 1hr.

According to the notes in that file, it’s created by running
bash clamav-unofficial-sigs.sh --install-cron

The config files for clamav-unofficial-sigs.sh are stored in /etc/clamav-unofficial-sigs.sh

According to the notes in master.conf, i need to modify user.conf to enter my own settings, but user.conf is part of the e-smith template system. So I’d need to modify the e-smith templates or build a custom template. How do I signal an update to the e-smith system to regenerate all the clamav-unofficial-sigs config and cron files?

Edit, I should have carried on with my thought process before submitting my post.

the script /usr/sbin/clamav-unofficial-sigs.sh is only able to set the minutes for the cron job for updating the unofficial signatures. (It’s on line 676 in clamav-unofficial-sigs.sh)

So the whole unofficial signature update system is hard coded to work on 1hr intervals.

It seems like a might not be able to change the update frequency unless I manually edit the clamav-unofficial-sigs cron job.

Does any one have any ideas?

Thanks
Bob

signal-event nethserver-antivirus-update

The cron files are not templated, they’re not touched by e-smith.

thank you @mrmarkuz

bob

I changed the timings in
/etc/cron.d/clamav-unofficial-sigs

from
30 * * * *
to
37 5 * * *
(chosen as a random time)

This has changed the clam unofficial sigs update from hourly to daily.
So far, so good :slight_smile:

regards
Bob

1 Like