Skip to content

Commit bb24a4c

Browse files
author
Kristan Kenney
authored
Merge pull request hestiacp#1827 from hestiacp/conf-updates
ClamAV configuration updates
2 parents 8c08d07 + c7b6b6c commit bb24a4c

File tree

3 files changed

+43
-7
lines changed

3 files changed

+43
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ All notable changes to this project will be documented in this file.
9090
- Standardize headers for upgrade scripts
9191
- Improved how we handle custom themes
9292
- Refactored HMTL / PHP code WebUI
93+
- Updated ClamAV configuration
9394

9495

9596
## [1.3.5] - Service Release

install/deb/clamav/clamd.conf

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
#Automatically Generated by clamav-base postinst
2-
#To reconfigure clamd run #dpkg-reconfigure clamav-base
3-
#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
1+
#Automatically Generated by clamav-daemon postinst
2+
#To reconfigure clamd run #dpkg-reconfigure clamav-daemon
3+
#Please read /usr/share/doc/clamav-daemon/README.Debian.gz for details
44
LocalSocket /var/run/clamav/clamd.ctl
55
FixStaleSocket true
66
LocalSocketGroup clamav
77
LocalSocketMode 666
88
# TemporaryDirectory is not set to its default /tmp here to make overriding
99
# the default with environment variables TMPDIR/TMP/TEMP possible
1010
User clamav
11-
# AllowSupplementaryGroups true
1211
ScanMail true
1312
ScanArchive true
1413
ArchiveBlockEncrypted false
@@ -19,26 +18,38 @@ ReadTimeout 180
1918
MaxThreads 12
2019
MaxConnectionQueueLength 15
2120
LogSyslog false
21+
LogRotate true
2222
LogFacility LOG_LOCAL6
2323
LogClean false
2424
LogVerbose true
25-
PidFile /var/run/clamav/clamd.pid
25+
PreludeEnable no
26+
PreludeAnalyzerName ClamAV
2627
DatabaseDirectory /var/lib/clamav
28+
OfficialDatabaseOnly false
2729
SelfCheck 3600
2830
Foreground false
2931
Debug false
3032
ScanPE true
33+
MaxEmbeddedPE 10M
3134
ScanOLE2 true
35+
ScanPDF true
3236
ScanHTML true
37+
MaxHTMLNormalize 10M
38+
MaxHTMLNoTags 2M
39+
MaxScriptNormalize 5M
40+
MaxZipTypeRcg 1M
41+
ScanSWF true
3342
ExitOnOOM false
3443
LeaveTemporaryFiles false
3544
AlgorithmicDetection true
3645
ScanELF true
3746
IdleTimeout 30
47+
CrossFilesystems true
3848
PhishingSignatures true
3949
PhishingScanURLs true
4050
PhishingAlwaysBlockSSLMismatch false
4151
PhishingAlwaysBlockCloak false
52+
PartitionIntersection false
4253
DetectPUA false
4354
ScanPartialMessages false
4455
HeuristicScanPrecedence false
@@ -48,6 +59,23 @@ SendBufTimeout 200
4859
MaxQueue 100
4960
ExtendedDetectionInfo true
5061
OLE2BlockMacros false
62+
AllowAllMatchScan true
63+
ForceToDisk false
64+
DisableCertCheck false
65+
DisableCache false
66+
MaxScanTime 120000
67+
MaxScanSize 100M
68+
MaxFileSize 25M
69+
MaxRecursion 16
70+
MaxFiles 10000
71+
MaxPartitions 50
72+
MaxIconsPE 100
73+
PCREMatchLimit 10000
74+
PCRERecMatchLimit 5000
75+
PCREMaxFileSize 25M
76+
ScanXMLDOCS true
77+
ScanHWP3 true
78+
MaxRecHWP3 16
5179
StreamMaxLength 25M
5280
LogFile /var/log/clamav/clamav.log
5381
LogTime true
@@ -56,5 +84,5 @@ LogFileMaxSize 0
5684
Bytecode true
5785
BytecodeSecurity TrustSigned
5886
BytecodeTimeout 60000
59-
OfficialDatabaseOnly false
60-
CrossFilesystems true
87+
PidFile /var/run/clamav/clamd.pid
88+
OnAccessMaxFileSize 5M

install/upgrade/versions/1.4.0.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ if [ "$MAIL_SYSTEM" == "exim4" ]; then
6464
echo ' If you want to use the Hestia smtp relay feature,'
6565
echo ' please review the /etc/exim4/exim4.conf.template'
6666
echo ' file and resolve any conflicts.'
67+
$HESTIA/bin/v-add-user-notification admin 'Manual intervention required to enable SMTP Relay' 'ERROR: Manual intervention required to enable SMTP Relay: <br />Exim only supports one plaintext authenticator. If you want to use the Hestia smtp relay feature, please review the /etc/exim4/exim4.conf.template file and resolve any conflicts.'
6768
else
6869
disable_smtp_relay=false
6970
fi
@@ -178,6 +179,12 @@ if [ -d "$HESTIA/web/images/webapps/" ]; then
178179
rm -rf $HESTIA/web/src/app/WebApp/Installers/Joomla
179180
fi
180181

182+
# Update ClamAV configuration file
183+
if [ -f "/etc/clamav/clamd.conf" ]; then
184+
cp -f $HESTIA_INSTALL_DIR/clamav/clamd.conf /etc/clamav/
185+
$HESTIA/bin/v-add-user-notification admin 'ClamAV config has been overwritten' 'Warning: If you have manualy changed /etc/clamav/clamd.conf and any changes you made will be lost an backup has been created in the /root/hst_backups folder with the original config. If you have not changed the config file you can ignore this message'
186+
fi
187+
181188
if [ -f "$HESTIA/data/firewall/ipset/blacklist.sh" ]; then
182189
sed -i '/BruteForceBlocker/d' $HESTIA/data/firewall/ipset/blacklist.sh
183190
fi

0 commit comments

Comments
 (0)