diff --git a/install_amavis.sh b/install_amavis.sh index 3129788..847ce83 100755 --- a/install_amavis.sh +++ b/install_amavis.sh @@ -128,6 +128,25 @@ DEFAULT_SI_AUTHORISATION_SIGNATURE_WF=76ed7ca6670dbee497e1a0397a7e178c4caa25888b #DEFAULT_SI_AUTHORISATION_SIGNATURE_OOPEN=b0b7e94d3fcc8f3b1f128edd5830392361868cf0174723a9924ac25bf8b1b588cb974b50234e1bc1d9839dfe0ca6e1627733d90daf1399347b1046d20c2e3a89 DEFAULT_SI_AUTHORISATION_SIGNATURE_OOPEN=abb4ec6b194639f3d123154f1b971843a3b8751d8c1bcdc7d07ed6db26621b11bca0e23d2a42b60aef3f7b7803a1466a964d90c7b1e82d67c7680c8f46b59a4e +# SecuriteInfo signatur databases +# +SI_SIGNATUR_DATABASES=" + securiteinfo.hdb + securiteinfo.ign2 + javascript.ndb + spam_marketing.ndb + securiteinfohtml.hdb + securiteinfoascii.hdb + securiteinfoandroid.hdb + securiteinfoold.hdb + securiteinfopdf.hdb + securiteinfo0hour.hdb + securiteinfo.mdb + securiteinfo.yara + securiteinfo.pdb + securiteinfo.wdb +" + # - This parameter will be not asked, so setting it here # - QUARANTINE_ADMIN=$DEFAULT_QUARANTINE_ADMIN @@ -2936,6 +2955,50 @@ else [[ $OK = "yes" ]] || fatal "Abbruch durch User" fi +echononl " Add SecuriteInfo signatur databases to freshclam.conf" +if $SECURITE_INFO_IN_USE ; then + + if [[ -f "/etc/clamav/freshclam.conf" ]] ; then + + _done=false + for signatur_database in $SI_SIGNATUR_DATABASES do + + if ! $(grep -q -E "DatabaseCustomURL\s+https://www.securiteinfo.com.*${signatur_database}" "/etc/clamav/freshclam.conf" 2>/dev/null) ; then + + echo "DatabaseCustomURL https://www.securiteinfo.com/get/signatures/${SI_AUTHORISATION_SIGNATURE}/${signatur_database}" >> /etc/clamav/freshclam.conf + + _done=true + + fi + + done + + if $_done ; then + echo_ok + else + echo_skipped + fi + + else + + echo_failed + error "Cannot find freshclam configuration file '/etc/clamav/freshclam.conf'!" + + echononl "continue anyway [yes/no]: " + read OK + OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')" + while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do + echononl "Wrong entry! - repeat [yes/nno]: " + read OK + done + [[ $OK = "yes" ]] || fatal "Abbruch durch User" + + fi # if [[ -f "/etc/clamav/freshclam.conf" ]] ; then + +else + echo_skipped +fi + echononl " Start ClamAv daemon.." if $systemd_exists ; then systemctl start clamav-daemon > /dev/null 2> $tmp_err_msg