initial commit of file from CVS for smeserver-clamav on Mon 10 Jul 08:35:52 BST 2023

This commit is contained in:
Brian Read
2023-07-10 08:35:52 +01:00
parent bfd6d39c86
commit 8a58bd853d
142 changed files with 1456 additions and 2 deletions

View File

@@ -0,0 +1 @@
AlertBrokenExecutables {$clamav{AlertBrokenExecutables} || 'no' }

View File

@@ -0,0 +1 @@
AlertEncrypted { $clamav{AlertEncrypted} || 'no' }

View File

@@ -0,0 +1 @@
AlertExceedsMax { $clamav{AlertExceedsMax} || 'no' }

View File

@@ -0,0 +1 @@
AlertOLE2Macros { $clamav{AlertOLE2Macros} || 'no' }

View File

@@ -0,0 +1 @@
AlertPartitionIntersection { $clamav{AlertPartitionIntersection} || 'no' }

View File

@@ -0,0 +1 @@
AlertPhishingCloak {$clamav{AlertPhishingCloak} || 'no' }

View File

@@ -0,0 +1 @@
AlertPhishingSSLMismatch {$clamav{AlertPhishingSSLMismatch} || 'no' }

View File

@@ -0,0 +1,4 @@
# Enable for 0.103.x
# This takes a LOT more ram as it has have the DBs loaded twice
# Maybe we should check the memory limit before we allow enabling?
ConcurrentDatabaseReload { $clamav{ConcurrentDatabaseReload} || 'no' }

View File

@@ -0,0 +1 @@
DatabaseDirectory /var/lib/clamav

View File

@@ -0,0 +1 @@
Debug { $clamav{Debug} || 'no' }

View File

@@ -0,0 +1 @@
FixStaleSocket yes

View File

@@ -0,0 +1 @@
Foreground no

View File

@@ -0,0 +1 @@
HeuristicAlerts {$clamav{HeuristicAlerts} || 'yes' }

View File

@@ -0,0 +1 @@
HeuristicScanPrecedence { $clamav{HeuristicScanPrecedence} || 'no' }

View File

@@ -0,0 +1,4 @@
{
# Waiting for a new job will timeout after this time (seconds).
"IdleTimeout $clamav{IdleTimeout}";
}

View File

@@ -0,0 +1 @@
LeaveTemporaryFiles { $clamav{LeaveTemporaryFiles} || 'no' }

View File

@@ -0,0 +1 @@
LocalSocket /run/clamd/clamd.socket

View File

@@ -0,0 +1 @@
LocalSocketMode 666

View File

@@ -0,0 +1 @@
LogClean { $clamav{LogClean} || 'yes' }

View File

@@ -0,0 +1 @@
LogFile /var/log/clamd/current

View File

@@ -0,0 +1 @@
LogTime { $clamav{LogTime} || 'yes' }

View File

@@ -0,0 +1 @@
LogVerbose { $clamav{LogVerbose} || 'yes' }

View File

@@ -0,0 +1,4 @@
{
# Maximum length the queue of pending connections may grow to.
"MaxConnectionQueueLength $clamav{MaxConnectionQueueLength}";
}

View File

@@ -0,0 +1,4 @@
{
# Maximal depth directories are scanned at.
"MaxDirectoryRecursion $clamav{MaxDirectoryRecursion}";
}

View File

@@ -0,0 +1,5 @@
{
# Files in archives larger than this limit won't be scanned.
# Value of 0 disables the limit.
"MaxFileSize $clamav{MaxFileSize}";
}

View File

@@ -0,0 +1,5 @@
{
# Number of files to be scanned within an archive.
# Value of 0 disables the limit.
"MaxFiles $clamav{MaxFiles}";
}

View File

@@ -0,0 +1,7 @@
{
# Nested archives are scanned recursively, e.g. if a Zip archive contains a RAR
# file, all files within it will also be scanned. This options specifies how
# deep the process should be continued.
# Value of 0 disables the limit.
"MaxRecursion $clamav{MaxRecursion}";
}

View File

@@ -0,0 +1,4 @@
{
# Maximal number of threads running at the same time.
"MaxThreads $clamav{MaxThreads}";
}

View File

@@ -0,0 +1 @@
PidFile /run/clamd/clamd.pid

View File

@@ -0,0 +1,5 @@
{
# Waiting for data from a client socket will timeout after this time (seconds).
# Value of 0 disables the timeout.
"ReadTimeout $clamav{ReadTimeout}";
}

View File

@@ -0,0 +1 @@
ScanArchive { $clamav{ScanArchive} || 'yes' }

View File

@@ -0,0 +1 @@
ScanHTML { $clamav{ScanHTML} || 'yes' }

View File

@@ -0,0 +1 @@
ScanMail { $clamav{ScanMail} || 'yes' }

View File

@@ -0,0 +1 @@
ScanOLE2 { $clamav{ScanOLE2} || 'yes' }

View File

@@ -0,0 +1 @@
ScanPE { $clamav{ScanPE} || 'yes' }

View File

@@ -0,0 +1,2 @@
# Perform internal sanity check (database integrity and freshness).
SelfCheck { $clamav{SelfCheck} || '600' }

View File

@@ -0,0 +1,2 @@
# Close the connection if this limit is exceeded.
StreamMaxLength { $clamav{StreamMaxLength} || '25M' }

View File

@@ -0,0 +1,7 @@
{
# TCP address.
# By default we bind to INADDR_ANY, probably not wise.
# Enable the following to provide some degree of protection
# from the outside world.
$clamav{TCPAddr} ? "TCPAddr $clamav{TCPAddr}" : '#TCPAddr 127.0.0.1';
}

View File

@@ -0,0 +1,4 @@
{
# TCP port address.
$clamav{TCPSocket} ? "TCPSocket $clamav{TCPSocket}" : '#TCPSocket 3310';
}

View File

@@ -0,0 +1 @@
TemporaryDirectory /var/tmp

View File

@@ -0,0 +1 @@
User clamscan

View File

@@ -0,0 +1,4 @@
#! /bin/sh
# We do not run freshclam here, because an always-running supervised freshclam
# is used in SME Server
exit 0

View File

@@ -0,0 +1,14 @@
{
my $min = substr(gmtime,14,2);
$OUT .= "\n";
$OUT .= "# smeserver-clamscan filesystem scan\n";
my $ScanFreq = $clamav{FilesystemScan} || 'disabled';
if ($ScanFreq eq 'daily') {
$OUT .= $min."\t0\t*\t*\t*\troot\t/sbin/e-smith/smeserver-clamscan\n";
} elsif ($ScanFreq eq 'weekly') {
$OUT .= $min."\t0\t*\t*\t6\troot\t/sbin/e-smith/smeserver-clamscan\n";
} else {
$OUT .= "# disabled\n";
}
}

View File

@@ -0,0 +1,3 @@
{
"Checks $clamav{Checks}";
}

View File

@@ -0,0 +1,7 @@
{
# Use DNS to verify virus database version. Freshclam uses DNS TXT records
# to verify database and software versions. We highly recommend enabling
# this option.
"DNSDatabaseInfo $clamav{DNSDatabaseInfo}";
}

View File

@@ -0,0 +1 @@
DatabaseDirectory /var/lib/clamav

View File

@@ -0,0 +1,13 @@
{
# Uncomment the following line and replace XY with your country
# code. See http://www.iana.org/cctld/cctld-whois.htm for the full list.
# Default: There is no default, which results in an error when running freshclam
$OUT = "DatabaseMirror $clamav{DatabaseMirror}\n";
# database.clamav.net is a round-robin record which points to our most
# reliable mirrors. It's used as a fall back in case db.XY.clamav.net is
# not working. DO NOT TOUCH the following line unless you know what you
# are doing.
$OUT .= "DatabaseMirror database.clamav.net";
}

View File

@@ -0,0 +1 @@
DatabaseOwner clamupdate

View File

@@ -0,0 +1 @@
Foreground no

View File

@@ -0,0 +1 @@
LogTime { $clamav{LogTime} || 'yes' }

View File

@@ -0,0 +1 @@
LogVerbose { $clamav{LogVerbose} || 'yes' }

View File

@@ -0,0 +1,4 @@
{
# How many attempts to make before giving up.
"MaxAttempts $clamav{MaxAttempts}";
}

View File

@@ -0,0 +1 @@
NotifyClamd /etc/clamd.d/scan.conf

View File

@@ -0,0 +1 @@
OnErrorExecute "/sbin/e-smith/freshclam-update-failed"

View File

@@ -0,0 +1 @@
OnUpdateExecute "/sbin/e-smith/freshclam-update-ok"

View File

@@ -0,0 +1,14 @@
{
# Proxy settings
$OUT = '';
for ( qw(Server Port Username Password) )
{
my $name = "HTTPProxy$_";
next unless $clamav{$name};
$OUT .= "$name $clamav{$name}\n";
}
}

View File

@@ -0,0 +1 @@
UpdateLogFile /var/log/freshclam/current

View File

@@ -0,0 +1,10 @@
#
/var/log/clamd/current \{
monthly
notifempty
missingok
postrotate
/bin/kill -HUP `cat /var/run/clamd/clamd.pid 2> /dev/null` 2> /dev/null || true
endscript
\}

View File

@@ -0,0 +1,8 @@
/var/log/freshclam/current \{
monthly
notifempty
missingok
postrotate
systemctl try-restart freshclam.service
endscript
\}

View File

@@ -0,0 +1,7 @@
[Service]
{
# memory limit to catch any memory leak before it kills the system
$OUT .= "MemoryLimit=";
$OUT .= ($clamd{MemLimit} > "1610612736") ? $clamd{MemLimit} : "1610612736";
}

View File

@@ -0,0 +1 @@
d /run/clamd 0755 clamscan virusgroup