initial commit of file from CVS for smeserver-clamav on Mon 10 Jul 08:35:52 BST 2023
This commit is contained in:
@@ -0,0 +1 @@
|
||||
AlertBrokenExecutables {$clamav{AlertBrokenExecutables} || 'no' }
|
@@ -0,0 +1 @@
|
||||
AlertEncrypted { $clamav{AlertEncrypted} || 'no' }
|
@@ -0,0 +1 @@
|
||||
AlertExceedsMax { $clamav{AlertExceedsMax} || 'no' }
|
@@ -0,0 +1 @@
|
||||
AlertOLE2Macros { $clamav{AlertOLE2Macros} || 'no' }
|
@@ -0,0 +1 @@
|
||||
AlertPartitionIntersection { $clamav{AlertPartitionIntersection} || 'no' }
|
@@ -0,0 +1 @@
|
||||
AlertPhishingCloak {$clamav{AlertPhishingCloak} || 'no' }
|
@@ -0,0 +1 @@
|
||||
AlertPhishingSSLMismatch {$clamav{AlertPhishingSSLMismatch} || 'no' }
|
@@ -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' }
|
@@ -0,0 +1 @@
|
||||
DatabaseDirectory /var/lib/clamav
|
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/Debug
Normal file
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/Debug
Normal file
@@ -0,0 +1 @@
|
||||
Debug { $clamav{Debug} || 'no' }
|
@@ -0,0 +1 @@
|
||||
FixStaleSocket yes
|
@@ -0,0 +1 @@
|
||||
Foreground no
|
@@ -0,0 +1 @@
|
||||
HeuristicAlerts {$clamav{HeuristicAlerts} || 'yes' }
|
@@ -0,0 +1 @@
|
||||
HeuristicScanPrecedence { $clamav{HeuristicScanPrecedence} || 'no' }
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
# Waiting for a new job will timeout after this time (seconds).
|
||||
"IdleTimeout $clamav{IdleTimeout}";
|
||||
}
|
@@ -0,0 +1 @@
|
||||
LeaveTemporaryFiles { $clamav{LeaveTemporaryFiles} || 'no' }
|
@@ -0,0 +1 @@
|
||||
LocalSocket /run/clamd/clamd.socket
|
@@ -0,0 +1 @@
|
||||
LocalSocketMode 666
|
@@ -0,0 +1 @@
|
||||
LogClean { $clamav{LogClean} || 'yes' }
|
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/LogFile
Normal file
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/LogFile
Normal file
@@ -0,0 +1 @@
|
||||
LogFile /var/log/clamd/current
|
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/LogTime
Normal file
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/LogTime
Normal file
@@ -0,0 +1 @@
|
||||
LogTime { $clamav{LogTime} || 'yes' }
|
@@ -0,0 +1 @@
|
||||
LogVerbose { $clamav{LogVerbose} || 'yes' }
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
# Maximum length the queue of pending connections may grow to.
|
||||
"MaxConnectionQueueLength $clamav{MaxConnectionQueueLength}";
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
# Maximal depth directories are scanned at.
|
||||
"MaxDirectoryRecursion $clamav{MaxDirectoryRecursion}";
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
# Files in archives larger than this limit won't be scanned.
|
||||
# Value of 0 disables the limit.
|
||||
"MaxFileSize $clamav{MaxFileSize}";
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
# Number of files to be scanned within an archive.
|
||||
# Value of 0 disables the limit.
|
||||
"MaxFiles $clamav{MaxFiles}";
|
||||
}
|
@@ -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}";
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
# Maximal number of threads running at the same time.
|
||||
"MaxThreads $clamav{MaxThreads}";
|
||||
}
|
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/PidFile
Normal file
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/PidFile
Normal file
@@ -0,0 +1 @@
|
||||
PidFile /run/clamd/clamd.pid
|
@@ -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}";
|
||||
}
|
@@ -0,0 +1 @@
|
||||
ScanArchive { $clamav{ScanArchive} || 'yes' }
|
@@ -0,0 +1 @@
|
||||
ScanHTML { $clamav{ScanHTML} || 'yes' }
|
@@ -0,0 +1 @@
|
||||
ScanMail { $clamav{ScanMail} || 'yes' }
|
@@ -0,0 +1 @@
|
||||
ScanOLE2 { $clamav{ScanOLE2} || 'yes' }
|
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/ScanPE
Normal file
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/ScanPE
Normal file
@@ -0,0 +1 @@
|
||||
ScanPE { $clamav{ScanPE} || 'yes' }
|
@@ -0,0 +1,2 @@
|
||||
# Perform internal sanity check (database integrity and freshness).
|
||||
SelfCheck { $clamav{SelfCheck} || '600' }
|
@@ -0,0 +1,2 @@
|
||||
# Close the connection if this limit is exceeded.
|
||||
StreamMaxLength { $clamav{StreamMaxLength} || '25M' }
|
7
root/etc/e-smith/templates/etc/clamd.d/scan.conf/TCPAddr
Normal file
7
root/etc/e-smith/templates/etc/clamd.d/scan.conf/TCPAddr
Normal 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';
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
# TCP port address.
|
||||
$clamav{TCPSocket} ? "TCPSocket $clamav{TCPSocket}" : '#TCPSocket 3310';
|
||||
}
|
@@ -0,0 +1 @@
|
||||
TemporaryDirectory /var/tmp
|
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/User
Normal file
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/User
Normal file
@@ -0,0 +1 @@
|
||||
User clamscan
|
@@ -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
|
14
root/etc/e-smith/templates/etc/crontab/clamav
Normal file
14
root/etc/e-smith/templates/etc/crontab/clamav
Normal 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";
|
||||
}
|
||||
}
|
3
root/etc/e-smith/templates/etc/freshclam.conf/Checks
Normal file
3
root/etc/e-smith/templates/etc/freshclam.conf/Checks
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"Checks $clamav{Checks}";
|
||||
}
|
@@ -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}";
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
DatabaseDirectory /var/lib/clamav
|
13
root/etc/e-smith/templates/etc/freshclam.conf/DatabaseMirror
Normal file
13
root/etc/e-smith/templates/etc/freshclam.conf/DatabaseMirror
Normal 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";
|
||||
}
|
@@ -0,0 +1 @@
|
||||
DatabaseOwner clamupdate
|
1
root/etc/e-smith/templates/etc/freshclam.conf/Foreground
Normal file
1
root/etc/e-smith/templates/etc/freshclam.conf/Foreground
Normal file
@@ -0,0 +1 @@
|
||||
Foreground no
|
1
root/etc/e-smith/templates/etc/freshclam.conf/LogTime
Normal file
1
root/etc/e-smith/templates/etc/freshclam.conf/LogTime
Normal file
@@ -0,0 +1 @@
|
||||
LogTime { $clamav{LogTime} || 'yes' }
|
1
root/etc/e-smith/templates/etc/freshclam.conf/LogVerbose
Normal file
1
root/etc/e-smith/templates/etc/freshclam.conf/LogVerbose
Normal file
@@ -0,0 +1 @@
|
||||
LogVerbose { $clamav{LogVerbose} || 'yes' }
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
# How many attempts to make before giving up.
|
||||
"MaxAttempts $clamav{MaxAttempts}";
|
||||
}
|
@@ -0,0 +1 @@
|
||||
NotifyClamd /etc/clamd.d/scan.conf
|
@@ -0,0 +1 @@
|
||||
OnErrorExecute "/sbin/e-smith/freshclam-update-failed"
|
@@ -0,0 +1 @@
|
||||
OnUpdateExecute "/sbin/e-smith/freshclam-update-ok"
|
14
root/etc/e-smith/templates/etc/freshclam.conf/ProxySettings
Normal file
14
root/etc/e-smith/templates/etc/freshclam.conf/ProxySettings
Normal 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";
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
UpdateLogFile /var/log/freshclam/current
|
@@ -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
|
||||
\}
|
@@ -0,0 +1,8 @@
|
||||
/var/log/freshclam/current \{
|
||||
monthly
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
systemctl try-restart freshclam.service
|
||||
endscript
|
||||
\}
|
@@ -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";
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
d /run/clamd 0755 clamscan virusgroup
|
Reference in New Issue
Block a user