Cron Daemon problem regarding ClamAV

NethServer Version: NethServer release 7.6.1810
Module: nethserver-antivirus-1.3.1-1

I’m receiving an email from NS7 server, which is being used as an email server, with the following Subject:
Cron root@hermod [ -x /usr/sbin/clamav-unofficial-sigs.sh ] && /bin/bash /usr/sbin/clamav-unofficial-sigs.sh
And this text in the body:
curl: (22) The requested URL returned error: 403 Forbidden
curl: (22) The requested URL returned error: 403 Forbidden

This server is behind a proxy, so it seems that this cron job is not using the proxy. Can anyone please help me?

Couldn’t test it myself but I think you are right about the script not using the proxy.

Check /etc/clamav-unofficial-sigs/user.conf (generated from a template) and try playing with some proxy settings (example on master.conf):

# Proxy Support
# If necessary to proxy database downloads, define the rsync, curl, wget, dig, hosr proxy settings here.
#rsync_proxy="username:password@proxy_host:proxy_port"
#curl_proxy="--proxy http://username:password@proxy_host:proxy_port"
#wget_proxy="-e http_proxy=http://username:password@proxy_host:proxy_port -e https_proxy=https://username:password@proxy_host:proxy_port"
#dig_proxy="@proxy_host -p proxy_host:proxy_port"
#host_proxy="@proxy_host" #does not support port

If manual proxy settings work, we could consider adding the parameters in a template. We may borrow some code/ideas from:

Probably not necessary but, additionaly or for testing purposes, you could check /var/log/clamav-unofficial-sigs/clamav-unofficial-sigs.log, or run /usr/sbin/clamav-unofficial-sigs.sh to see if it shows more detailed failure messages.

3 Likes

I’m on it, wait for feedback

Agreed, that’s a good start, if the manual test works, I’m going to make a template and issue a PR

2 Likes