This assumes 'zimbra' is user and group id 'zimbra', change it accordingly to your system to match your zimbra user.

−

END CODE

+

Note: I had to install gmp-devel and bzip2-devel so the configure could find all its header files. Your mileage may very. If you get an error about GNU MP missing install gmp-devel. &amp;quot;yum install gmp-devel&amp;quot;, and &amp;quot;yum install bzip2-devel&amp;quot; in Fedora and Red Hat. In Ubuntu, you must install libsll-dev by this command: apt-get install libssl-dev.

−

This assumes zimbra is user and group id 'zimbra', change it accordingly to your system to match your zimbra user.

−

Note: I had to install gmp-devel and bzip2-devel so the configure could find all its header files. Your mileage may very. If you get an error about GNU MP missing install gmp-devel. "yum install gmp-devel", and "yum install bzip2-devel" in Fedora and Red Hat.

+

If your 'configure' goes well, and make sure it does as you don't really want ClamAV installed without some of its available testing ability being compiled.

+

Run: '''make'''

−

If your 'configure' goes well, and make sure it does as you don't really want ClamAV installed without some of its available testing ability being compiled.

+

The following steps should be run as root.

+

+

Assuming there are no errors,

+

+

Run: '''make check''' and then '''make install'''.

+

Again assuming no errors, you now have the new version installed into /opt/zimbra/clamav-0.96

+

+

Now we compare then copy your old clamd.conf and freshclam.conf from the previous version to the new version directory:

+

+

'''cd /opt/zimbra/clamav-0.96/etc/'''

+

+

'''diff clamd.conf ../../clamav/etc/clamd.conf'''

+

+

'''diff freshclam.conf ../../clamav/etc/freshclam.conf'''

+

+

Above is just incase you are curious of what we are changing/over writing from the clamav defaults.

+

+

'''mv clamd.conf clamd.conf.org'''

−

Run: make

+

'''mv freshclam.conf freshclam.conf.org'''

−

Assume no errors,

−

Run: make check, and then make install.

−

Again assuming no errors, you now have the new version installed into /opt/zimbra/clamav-0.90.2

−

Copy your old clamd.conf and freshclam.conf from the privious version to the new version directory:

+

'''cd /opt/zimbra/conf'''

−

Now we need to edit clam and freshclam's conf files.

+

'''cp clamd.conf /opt/zimbra/clamav-0.96/etc/'''

−

START CODE

+

'''cp freshclam.conf /opt/zimbra/clamav-0.96/etc/'''

−

cd /opt/zimbra/clamav-0.90.1/etc/

−

diff clamd.conf ../../clamav-0.90.2/etc/clamd.conf

−

diff freshclam.conf ../../clamav-0.90.2/etc/freshclam.conf

−

Above is just to be sure of what we are changing.

−

cd /opt/zimbra/clamav-0.90.2/etc/

−

mv clamd.conf clamd.conf.org

−

mv freshclam.conf freshclam.conf.org

−

cd cd /opt/zimbra/clamav-0.90.1/etc/

−

cp clamd.conf /opt/zimbra/clamav-0.90.2/etc/

−

cp freshclam.conf /opt/zimbra/clamav-0.90.2/etc/

−

END CODE

+

As zimbra: '''zmcontrol stop''' to stop Zimbra.

−

Run: 'zmcontrol stop' everything.

+

Now need to delete the symbolic link and re-link it to the new install. As root:

−

Now need to delete the symbolic link and re-link it to the new install:

'''rm -rf clamav''' (or if you want to keep the old install & link around, so you can easily back out, just do '''mv clamav clamav.old''')

+

+

'''ln -s /opt/zimbra/clamav-0.96 /opt/zimbra/clamav'''

−

ln -s /opt/zimbra/clamav-0.90.2 /opt/zimbra/clamav

+

Create directory /opt/zimbra/clamav/db

−

END CODE

+

'''mkdir /opt/zimbra/clamav/db '''

Now you should make sure zimbra owns all of clamav.

Now you should make sure zimbra owns all of clamav.

−

Code:

−

chown -R zimbra:zimbra /opt/zimbra/clamav-0.90.2

+

'''chown -R zimbra:zimbra /opt/zimbra/clamav-0.96'''

+

+

zimbra also needs access to freshclam.conf

+

+

'''chmod a+r /opt/zimbra/clamav/etc/freshclam.conf'''

−

Create directory /opt/zimbra/clamav/db

Next we need to update the virus database.

Next we need to update the virus database.

−

Run: /opt/zimbra/clamav/bin/freshclam

−

Need to start things back up.

+

'''su zimbra'''

−

Run 'zmcontrol start'

+

−

Run 'zmcontrol status' to make sure antivirus is running. If it is, you're good to go.

+

Run: '''/opt/zimbra/clamav/bin/freshclam'''

−

You should check /opt/zimbra/log/clamd.log for errors, as well as freshclam in the same directory. Also /var/log/zimbra.log. To test out ClamAV I would suggest http://www.webmail.us/testvirus to send different variations of the EICAR test virus to one of your email addresses. Depending on if you have "Send notice ot recipient" check in Global Settings of the Admin Web UI, the user should receive around 20 email notifications of the emails being quarantined. Don't worry about the two that got through. Apparently ClamAV doesn't check for the techniques. There are although no virii included in those two emails, so it doesn't worry me.

+

If you get any warnings, just run the command again to confirm that everything was successfully updated.

+

+

NOTE: if you run zimbra behind a proxy, you need to modify /opt/zimbra/clamav/etc/freshclam.conf. Please uncomment these lines:

+

+

HTTPProxyServer myproxyserver.com

+

HTTPProxyPort 1234

+

HTTPProxyUsername myusername

+

HTTPProxyPassword mypass

+

+

+

+

Need to start Zimbra.

+

Run '''zmcontrol start'''

+

+

Note: you may not need to stop Zimbra during this update. If you don't stop Zimbra, just do '''zmantivirusctl restart''' at this point.

+

+

Run '''zmcontrol status''' to make sure antivirus is running. If it is, you're good to go.

+

+

You should check /opt/zimbra/log/clamd.log for errors, as well as freshclam in the same directory. Also /var/log/zimbra.log. To test out ClamAV I would suggest http://www.webmail.us/testvirus to send different variations of the EICAR test virus to one of your email addresses. Depending on if you have &amp;quot;Send notice ot recipient&amp;quot; check in Global Settings of the Admin Web UI, the user should receive around 20 email notifications of the emails being quarantined. Don&amp;#39;t worry about the two that got through. Apparently ClamAV doesn&amp;#39;t check for the techniques. There are although no virii included in those two emails, so it doesn&amp;#39;t worry me.

You can delete the previous install of clamav once you make sure everything is working. Delete the /opt/zimbra/clamav-0.90.1 directory and everythnig it contains. Again may want to wait a weelk or two to make sure you have the other version working well first.

You can delete the previous install of clamav once you make sure everything is working. Delete the /opt/zimbra/clamav-0.90.1 directory and everythnig it contains. Again may want to wait a weelk or two to make sure you have the other version working well first.

+

+

==Scripting==

+

+

Possible Script: (tweaked and tested on a CentOS server as of July 14, 2010)

If you have no idea how to upgrade or are a little shaky in doing the upgrade yourself, I recommend that you wait for the Zimbra official release.

Step 1: Make a backup.

Note: This was done on Fedora Core 4 minimal install. Also, all the following can be done either as root or as the zimbra user.
If you do it all as 'root', make sure you change ownership for the resulting clamav-0.90.2 folder in /opt/zimbra to zimbra:zimbra.

This HOWTO also assumes that you are upgrading from 0.90.1 to 0.90.2
Please substitute the versions above for what you are upgrading from and to.

Updating

To update, follow the following:
First go grab the latest ClamAV source from http://www.clamav.net/download (Current Stable Version is 0.96 )
Extract it to where ever you please. All this can either be done as root or as the zimbra user.
If you do it all as root make sure you change ownership for the resulting clamav folder in /opt/zimbra to zimbra:zimbra.

Assuming that the new clamav version is in the directory: /home/snelson ( substitute your username for &#39;snelson&#39; )

This assumes 'zimbra' is user and group id 'zimbra', change it accordingly to your system to match your zimbra user.

Note: I had to install gmp-devel and bzip2-devel so the configure could find all its header files. Your mileage may very. If you get an error about GNU MP missing install gmp-devel. &quot;yum install gmp-devel&quot;, and &quot;yum install bzip2-devel&quot; in Fedora and Red Hat. In Ubuntu, you must install libsll-dev by this command: apt-get install libssl-dev.

If your 'configure' goes well, and make sure it does as you don't really want ClamAV installed without some of its available testing ability being compiled.

Run: make

The following steps should be run as root.

Assuming there are no errors,

Run: make check and then make install.
Again assuming no errors, you now have the new version installed into /opt/zimbra/clamav-0.96

Now we compare then copy your old clamd.conf and freshclam.conf from the previous version to the new version directory:

cd /opt/zimbra/clamav-0.96/etc/

diff clamd.conf ../../clamav/etc/clamd.conf

diff freshclam.conf ../../clamav/etc/freshclam.conf

Above is just incase you are curious of what we are changing/over writing from the clamav defaults.

mv clamd.conf clamd.conf.org

mv freshclam.conf freshclam.conf.org

cd /opt/zimbra/conf

cp clamd.conf /opt/zimbra/clamav-0.96/etc/

cp freshclam.conf /opt/zimbra/clamav-0.96/etc/

As zimbra: zmcontrol stop to stop Zimbra.

Now need to delete the symbolic link and re-link it to the new install. As root:

Note: you may not need to stop Zimbra during this update. If you don't stop Zimbra, just do zmantivirusctl restart at this point.

Run zmcontrol status to make sure antivirus is running. If it is, you're good to go.

You should check /opt/zimbra/log/clamd.log for errors, as well as freshclam in the same directory. Also /var/log/zimbra.log. To test out ClamAV I would suggest http://www.webmail.us/testvirus to send different variations of the EICAR test virus to one of your email addresses. Depending on if you have &quot;Send notice ot recipient&quot; check in Global Settings of the Admin Web UI, the user should receive around 20 email notifications of the emails being quarantined. Don&#39;t worry about the two that got through. Apparently ClamAV doesn&#39;t check for the techniques. There are although no virii included in those two emails, so it doesn&#39;t worry me.
You can delete the previous install of clamav once you make sure everything is working. Delete the /opt/zimbra/clamav-0.90.1 directory and everythnig it contains. Again may want to wait a weelk or two to make sure you have the other version working well first.

Scripting

Possible Script: (tweaked and tested on a CentOS server as of July 14, 2010)