Difference between revisions of "Clamav unofficial sigs"

(Created page with "{{BC|Community Sandbox}} __FORCETOC__ <div class="col-md-12 ibox-content"> =Clamav unofficial sigs= {{KB|{{Unsupported}}|{{ZCS 8.5}}|{{ZCS 8.6}}|}} {{WIP}} The clamav-unoffic...")
 
Line 2: Line 2:
 
__FORCETOC__
 
__FORCETOC__
 
<div class="col-md-12 ibox-content">
 
<div class="col-md-12 ibox-content">
=Clamav unofficial sigs=
+
=ClamAV Unofficial Signatures=
{{KB|{{Unsupported}}|{{ZCS 8.5}}|{{ZCS 8.6}}|}}
+
{{KB|{{Unsupported}}|{{ZCS 8.7}}|{{ZCS 8.6}}|{{ZCS 8.5}}|}}
 
{{WIP}}
 
{{WIP}}
  
Line 9: Line 9:
  
 
The following steps should be performed to enable clamav unofficial sigs on Zimbra.
 
The following steps should be performed to enable clamav unofficial sigs on Zimbra.
 
+
=Download the Latest ClamAV Unofficial Signatures=
Download the latest version from https://github.com/extremeshok/clamav-unofficial-sigs/releases/latest (current release is 5.0.6)
+
Download the latest version from [https://github.com/extremeshok/clamav-unofficial-sigs/releases/latest '''the official github'''] (current release is 5.0.6)
 +
As '''root''' user:
 
<pre>
 
<pre>
 
# cd /opt/zimbra
 
# cd /opt/zimbra
Line 19: Line 20:
 
</pre>
 
</pre>
  
Create the required directories
+
Create the required directories as '''zimbra''' user:
 
<pre>
 
<pre>
 
# su - zimbra
 
# su - zimbra
Line 25: Line 26:
 
$ mkdir data/clamav-unofficial-sigs
 
$ mkdir data/clamav-unofficial-sigs
 
</pre>
 
</pre>
 +
=Configuring ClamAV Unofficial Signatures=
 +
Copy default config files to the config dir we've just created, as '''zimbra''' user:
 +
$ cp clamav-unofficial-sigs/config/{master.conf,user.conf} conf/clamav-unofficial-sigs/
  
Copy default config files to config dir
+
Create zimbra specific config on '''conf/clamav-unofficial-sigs/os.conf''':
<pre>
+
<pre>vi conf/clamav-unofficial-sigs/os.conf
$ cp clamav-unofficial-sigs/config/{master.conf,user.conf} conf/clamav-unofficial-sigs/
 
</pre>
 
 
 
Create zimbra specific config <code>conf/clamav-unofficial-sigs/os.conf</code>:
 
<pre>
 
 
clam_user="zimbra"
 
clam_user="zimbra"
 
clam_group="zimbra"
 
clam_group="zimbra"
Line 44: Line 43:
 
</pre>
 
</pre>
  
Try to run clamav-unofficial-sigs and check to output for possible errors.
+
=Running ClamAV Unofficial Signatures for the first time=
<pre>
+
Try to run clamav-unofficial-sigs and check to output for possible errors, as '''zimbra''' user
$ /bin/bash /opt/zimbra/clamav-unofficial-sigs/clamav-unofficial-sigs.sh -c /opt/zimbra/conf/clamav-unofficial-sigs
+
$ /bin/bash /opt/zimbra/clamav-unofficial-sigs/clamav-unofficial-sigs.sh -c /opt/zimbra/conf/clamav-unofficial-sigs
</pre>
 
  
Additional logs are available in <code>/opt/zimbra/log/clamav-unofficial-sigs.log</code>
+
Additional logs are available in '''/opt/zimbra/log/clamav-unofficial-sigs.log'''
  
If all went well, install cron job using <code>crontab -e</code>:
+
=Adding to Crontab the ClamAV Unofficial Signatures update=
<pre>
+
If all went well, configure a cron job using '''crontab -e''' as '''zimbra''' user
45 * * * * /bin/bash /opt/zimbra/clamav-unofficial-sigs/clamav-unofficial-sigs.sh -c /opt/zimbra/conf/clamav-unofficial-sigs > /dev/null
+
crontab -e
</pre>
+
45 * * * * /bin/bash /opt/zimbra/clamav-unofficial-sigs/clamav-unofficial-sigs.sh -c /opt/zimbra/conf/clamav-unofficial-sigs > /dev/null
  
Log rotation can be configured in e.g. <code>/etc/logrotate.d/clamav-unofficial-sigs</code>:
+
=Configure log rotation for ClamAV Unofficial Signatures=
 +
Log rotation can be configured in e.g. /etc/logrotate.d/clamav-unofficial-sigs:
 
<pre>
 
<pre>
 
/opt/zimbra/log/clamav-unofficial-sigs.log {
 
/opt/zimbra/log/clamav-unofficial-sigs.log {

Revision as of 09:38, 5 April 2016

ClamAV Unofficial Signatures

   KB 22579        Last updated on 2016-04-5  




0.00
(0 votes)


The clamav-unofficial-sigs script provides a simple way to download, test, and update third-party signature databases provided by Sanesecurity, FOXHOLE, OITC, Scamnailer, BOFHLAND, CRDF, Porcupine, Securiteinfo, MalwarePatrol.

The following steps should be performed to enable clamav unofficial sigs on Zimbra.

Download the Latest ClamAV Unofficial Signatures

Download the latest version from the official github (current release is 5.0.6) As root user:

# cd /opt/zimbra
# wget https://github.com/extremeshok/clamav-unofficial-sigs/archive/5.0.6.tar.gz
# tar -xf 5.0.6.tar.gz
# ln -sf clamav-unofficial-sigs-5.0.6 clamav-unofficial-sigs
# rm 5.0.6.tar.gz

Create the required directories as zimbra user:

# su - zimbra
$ mkdir conf/clamav-unofficial-sigs
$ mkdir data/clamav-unofficial-sigs

Configuring ClamAV Unofficial Signatures

Copy default config files to the config dir we've just created, as zimbra user:

$ cp clamav-unofficial-sigs/config/{master.conf,user.conf} conf/clamav-unofficial-sigs/

Create zimbra specific config on conf/clamav-unofficial-sigs/os.conf:

vi conf/clamav-unofficial-sigs/os.conf
clam_user="zimbra"
clam_group="zimbra"
clam_dbs="/opt/zimbra/data/clamav/db"
clamd_pid="/opt/zimbra/log/clamd.pid"
work_dir="/opt/zimbra/data/clamav-unofficial-sigs"
log_file_path="/opt/zimbra/log"
clamd_reload_opt="/opt/zimbra/clamav/bin/clamdscan --config-file=/opt/zimbra/conf/clamd.conf --reload"
clamscan_bin="/opt/zimbra/clamav/bin/clamscan"
user_configuration_complete="yes"

Running ClamAV Unofficial Signatures for the first time

Try to run clamav-unofficial-sigs and check to output for possible errors, as zimbra user

$ /bin/bash /opt/zimbra/clamav-unofficial-sigs/clamav-unofficial-sigs.sh -c /opt/zimbra/conf/clamav-unofficial-sigs

Additional logs are available in /opt/zimbra/log/clamav-unofficial-sigs.log

Adding to Crontab the ClamAV Unofficial Signatures update

If all went well, configure a cron job using crontab -e as zimbra user

crontab -e
45 * * * * /bin/bash /opt/zimbra/clamav-unofficial-sigs/clamav-unofficial-sigs.sh -c /opt/zimbra/conf/clamav-unofficial-sigs > /dev/null

Configure log rotation for ClamAV Unofficial Signatures

Log rotation can be configured in e.g. /etc/logrotate.d/clamav-unofficial-sigs:

/opt/zimbra/log/clamav-unofficial-sigs.log {
     weekly
     rotate 4
     missingok
     notifempty
     compress
     create 0644 zimbra zimbra
}
Jump to: navigation, search