Well, compiling is indeed one method to fix this yourself
.
However, if like me you've already got two installations of ClamAV installed (one for Zimbra, one for scanning server itself) then you can easily just tell Zimbra to use your distributions version:
Code: Select all
mv -v /opt/zimbra/common/sbin/clamd /opt/zimbra/common/sbin/clamd.bak
mv -v /opt/zimbra/common/bin/clambc /opt/zimbra/common/bin/clambc.bak
mv -v /opt/zimbra/common/bin/clamconf /opt/zimbra/common/bin/clamconf.bak
mv -v /opt/zimbra/common/bin/clamdscan /opt/zimbra/common/bin/clamdscan.bak
mv -v /opt/zimbra/common/bin/clamscan /opt/zimbra/common/bin/clamscan.bak
mv -v /opt/zimbra/common/bin/freshclam /opt/zimbra/common/bin/freshclam.bak
mv -v /opt/zimbra/common/lib/libclamav.so.7 /opt/zimbra/common/lib/libclamav.so.7.bak
mv -v /opt/zimbra/common/lib/libclamunrar.so.7 /opt/zimbra/common/lib/libclamunrar.so.7.bak
mv -v /opt/zimbra/common/lib/libclamunrar_iface.so.7 /opt/zimbra/common/lib/libclamunrar_iface.so.7.bak
ln -s /usr/sbin/clamd /opt/zimbra/common/sbin/clamd
ln -s /usr/bin/clambc /opt/zimbra/common/bin/clambc
ln -s /usr/bin/clamconf /opt/zimbra/common/bin/clamconf
ln -s /usr/bin/clamdscan /opt/zimbra/common/bin/clamdscan
ln -s /usr/bin/clamscan /opt/zimbra/common/bin/clamscan
ln -s /usr/bin/freshclam /opt/zimbra/common/bin/freshclam
ln -s /usr/lib64/libclamav.so.7 /opt/zimbra/common/lib/libclamav.so.7
# Some versions of ClamAV do not have these files, such as the one from EPEL for licensing reasons, so skip these if they do not exist
ln -s /usr/lib64/libclamunrar.so.7 /opt/zimbra/common/lib/libclamunrar.so.7
ln -s /usr/lib64/libclamunrar_iface.so.7 /opt/zimbra/common/lib/libclamunrar_iface.so.7
Depending on your distro you may have to adjust lib and bin paths
.
I've done mine using the ClamAV version from EPEL on CentOS 7 x86_64, and everything seems to be running smooth.
You may want to check your logs:
Before changes you'll get something like this:
Code: Select all
Fri Feb 2 07:31:01 2018 -> +++ Started at Fri Feb 2 07:31:01 2018
Fri Feb 2 07:31:01 2018 -> Received 0 file descriptor(s) from systemd.
Fri Feb 2 07:31:01 2018 -> clamd daemon 0.99.2 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Fri Feb 2 07:31:01 2018 -> Log file size limited to 20971520 bytes.
Fri Feb 2 07:31:01 2018 -> Reading databases from /opt/zimbra/data/clamav/db
Fri Feb 2 07:31:01 2018 -> Not loading PUA signatures.
Fri Feb 2 07:31:01 2018 -> Bytecode: Security mode set to "TrustSigned".
LibClamAV Warning: Detected duplicate databases /opt/zimbra/data/clamav/db/daily.cvd and /opt/zimbra/data/clamav/db/daily.cld, please manually remove one of them
LibClamAV Warning: Detected duplicate databases /opt/zimbra/data/clamav/db/bytecode.cld and /opt/zimbra/data/clamav/db/bytecode.cvd. The /opt/zimbra/data/clamav/db/bytecode.cld database is older and will not be loaded, you should manually remove it from the database directory.
Fri Feb 2 07:31:05 2018 -> Loaded 4566324 signatures.
Fri Feb 2 07:31:06 2018 -> TCP: Bound to [::1]:3310
Fri Feb 2 07:31:06 2018 -> TCP: Setting connection queue length to 200
Fri Feb 2 07:31:06 2018 -> TCP: Bound to [127.0.0.1]:3310
Fri Feb 2 07:31:06 2018 -> TCP: Setting connection queue length to 200
Fri Feb 2 07:31:06 2018 -> ERROR: TCP: Cannot bind to [127.0.0.1]:3310: Address already in use
ERROR: TCP: Cannot bind to [127.0.0.1]:3310: Address already in use
Fri Feb 2 07:31:06 2018 -> LOCAL: Unix socket file /opt/zimbra/data/clamav/clamav.sock
Fri Feb 2 07:31:06 2018 -> LOCAL: Setting connection queue length to 200
Fri Feb 2 07:31:06 2018 -> Limits: Global size limit set to 256000000 bytes.
Fri Feb 2 07:31:06 2018 -> Limits: File size limit set to 256000000 bytes.
Fri Feb 2 07:31:06 2018 -> Limits: Recursion level limit set to 16.
Fri Feb 2 07:31:06 2018 -> Limits: Files limit set to 10000.
Fri Feb 2 07:31:06 2018 -> Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Fri Feb 2 07:31:06 2018 -> Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Fri Feb 2 07:31:06 2018 -> Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Fri Feb 2 07:31:06 2018 -> Limits: MaxScriptNormalize limit set to 5242880 bytes.
Fri Feb 2 07:31:06 2018 -> Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Fri Feb 2 07:31:06 2018 -> Limits: MaxPartitions limit set to 50.
Fri Feb 2 07:31:06 2018 -> Limits: MaxIconsPE limit set to 100.
Fri Feb 2 07:31:06 2018 -> Limits: MaxRecHWP3 limit set to 16.
Fri Feb 2 07:31:06 2018 -> Limits: PCREMatchLimit limit set to 10000.
Fri Feb 2 07:31:06 2018 -> Limits: PCRERecMatchLimit limit set to 5000.
Fri Feb 2 07:31:06 2018 -> Limits: PCREMaxFileSize limit set to 26214400.
Fri Feb 2 07:31:06 2018 -> Archive support enabled.
Fri Feb 2 07:31:06 2018 -> Algorithmic detection enabled.
Fri Feb 2 07:31:06 2018 -> Portable Executable support enabled.
Fri Feb 2 07:31:06 2018 -> ELF support enabled.
Fri Feb 2 07:31:06 2018 -> Mail files support enabled.
Fri Feb 2 07:31:06 2018 -> OLE2 support enabled.
Fri Feb 2 07:31:06 2018 -> PDF support enabled.
Fri Feb 2 07:31:06 2018 -> SWF support enabled.
Fri Feb 2 07:31:06 2018 -> HTML support enabled.
Fri Feb 2 07:31:06 2018 -> XMLDOCS support enabled.
Fri Feb 2 07:31:06 2018 -> HWP3 support enabled.
Fri Feb 2 07:31:06 2018 -> Self checking every 600 seconds.
Fri Feb 2 07:36:34 2018 -> Pid file removed.
Fri Feb 2 07:36:34 2018 -> --- Stopped at Fri Feb 2 07:36:34 2018
Fri Feb 2 07:36:34 2018 -> Socket file removed.
After changes your output should look something like this:
Code: Select all
Fri Feb 2 07:58:43 2018 -> +++ Started at Fri Feb 2 07:58:43 2018
Fri Feb 2 07:58:43 2018 -> Received 0 file descriptor(s) from systemd.
Fri Feb 2 07:58:43 2018 -> clamd daemon 0.99.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Fri Feb 2 07:58:43 2018 -> Log file size limited to 20971520 bytes.
Fri Feb 2 07:58:43 2018 -> Reading databases from /opt/zimbra/data/clamav/db
Fri Feb 2 07:58:43 2018 -> Not loading PUA signatures.
Fri Feb 2 07:58:43 2018 -> Bytecode: Security mode set to "TrustSigned".
Fri Feb 2 07:58:50 2018 -> Loaded 6402453 signatures.
Fri Feb 2 07:58:51 2018 -> TCP: Bound to [::1]:3310
Fri Feb 2 07:58:51 2018 -> TCP: Setting connection queue length to 200
Fri Feb 2 07:58:51 2018 -> TCP: Bound to [127.0.0.1]:3310
Fri Feb 2 07:58:51 2018 -> TCP: Setting connection queue length to 200
Fri Feb 2 07:58:51 2018 -> ERROR: TCP: Cannot bind to [127.0.0.1]:3310: Address already in use
ERROR: TCP: Cannot bind to [127.0.0.1]:3310: Address already in use
Fri Feb 2 07:58:51 2018 -> LOCAL: Unix socket file /opt/zimbra/data/clamav/clamav.sock
Fri Feb 2 07:58:51 2018 -> LOCAL: Setting connection queue length to 200
Fri Feb 2 07:58:51 2018 -> Limits: Global size limit set to 256000000 bytes.
Fri Feb 2 07:58:51 2018 -> Limits: File size limit set to 256000000 bytes.
Fri Feb 2 07:58:51 2018 -> Limits: Recursion level limit set to 16.
Fri Feb 2 07:58:51 2018 -> Limits: Files limit set to 10000.
Fri Feb 2 07:58:51 2018 -> Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Fri Feb 2 07:58:51 2018 -> Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Fri Feb 2 07:58:51 2018 -> Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Fri Feb 2 07:58:51 2018 -> Limits: MaxScriptNormalize limit set to 5242880 bytes.
Fri Feb 2 07:58:51 2018 -> Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Fri Feb 2 07:58:51 2018 -> Limits: MaxPartitions limit set to 50.
Fri Feb 2 07:58:51 2018 -> Limits: MaxIconsPE limit set to 100.
Fri Feb 2 07:58:51 2018 -> Limits: MaxRecHWP3 limit set to 16.
Fri Feb 2 07:58:51 2018 -> Limits: PCREMatchLimit limit set to 10000.
Fri Feb 2 07:58:51 2018 -> Limits: PCRERecMatchLimit limit set to 5000.
Fri Feb 2 07:58:51 2018 -> Limits: PCREMaxFileSize limit set to 26214400.
Fri Feb 2 07:58:51 2018 -> Archive support enabled.
Fri Feb 2 07:58:51 2018 -> Algorithmic detection enabled.
Fri Feb 2 07:58:51 2018 -> Portable Executable support enabled.
Fri Feb 2 07:58:51 2018 -> ELF support enabled.
Fri Feb 2 07:58:51 2018 -> Mail files support enabled.
Fri Feb 2 07:58:51 2018 -> OLE2 support enabled.
Fri Feb 2 07:58:51 2018 -> PDF support enabled.
Fri Feb 2 07:58:51 2018 -> SWF support enabled.
Fri Feb 2 07:58:51 2018 -> HTML support enabled.
Fri Feb 2 07:58:51 2018 -> XMLDOCS support enabled.
Fri Feb 2 07:58:51 2018 -> HWP3 support enabled.
Fri Feb 2 07:58:51 2018 -> Self checking every 600 seconds.