CLAMAv Failed to start – Antivirus Engine Outdated – Emails deferred on Server – SLES10 – Zimbra HOWTO

If you are getting all your emails deferred, and can’t start correctly all the services required, check your logs and the status

DIAGNOSE

1) zmcontrol statud (as zimbra user)

2) mail:/opt/zimbra/log # tail -20 clamd.log
LibClamAV Error: cli_tgzload: Invalid size in header
LibClamAV Error: Can’t load /opt/zimbra/data/clamav/db/daily.cld: Malformed database
Fri Apr 16 13:56:55 2010 -> ERROR: Malformed database
ERROR: Malformed database
Fri Apr 16 14:01:03 2010 -> +++ Started at Fri Apr 16 14:01:03 2010
Fri Apr 16 14:01:03 2010 -> clamd daemon 0.93.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Fri Apr 16 14:01:03 2010 -> Log file size limited to 20971520 bytes.
Fri Apr 16 14:01:03 2010 -> Reading databases from /opt/zimbra/data/clamav/db
Fri Apr 16 14:01:03 2010 -> Not loading PUA signatures.
LibClamAV Warning: ***********************************************************
LibClamAV Warning: ***  This version of the ClamAV engine is outdated.     ***
LibClamAV Warning: *** DON’T PANIC! Read http://www.clamav.net/support/faq ***
LibClamAV Warning: ***********************************************************
LibClamAV Error: cli_hex2str(): Malformed hexstring: This ClamAV version has reached End of Life! Please upgrade to version 0.95 or later. For more information see  www.clamav.net/eol-clamav-094 and www.clamav.net/download (length: 169)
LibClamAV Error: Problem parsing database at line 742
LibClamAV Error: Can’t load daily.ndb: Malformed database
LibClamAV Error: cli_tgzload: Invalid size in header
LibClamAV Error: Can’t load /opt/zimbra/data/clamav/db/daily.cld: Malformed database
Fri Apr 16 14:01:04 2010 -> ERROR: Malformed database
ERROR: Malformed database

3)Also check:

mail:/opt/zimbra/log # tail -20 freshclam.log
Database updated (756787 signatures) from db.us.clamav.net (IP: 64.142.100.50)
WARNING: Clamd was NOT notified: Can’t connect to clamd on 127.0.0.1:3310
————————————–
freshclam daemon 0.93.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
ClamAV update process started at Fri Apr 16 13:56:55 2010
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.93.3 Recommended version: 0.96
DON’T PANIC! Read http://www.clamav.net/support/faq
main.cld is up to date (version: 52, sigs: 704727, f-level: 44, builder: sven)
daily.cvd is up to date (version: 10752, sigs: 52060, f-level: 51, builder: ccordes)
————————————–
————————————–
freshclam daemon 0.93.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
ClamAV update process started at Fri Apr 16 14:01:03 2010
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.93.3 Recommended version: 0.96
DON’T PANIC! Read http://www.clamav.net/support/faq
main.cld is up to date (version: 52, sigs: 704727, f-level: 44, builder: sven)
daily.cvd is up to date (version: 10752, sigs: 52060, f-level: 51, builder: ccordes)
————————————–

PROBLEM

Antivirus clamav engine outdated

SOLUTION

1) First, download from:

http://www.clamav.net/lang/en/download/

or from

http://www.clamav.net/lang/en/download/packages/packages-linux/

2) Extract

tar xvzf clamav-0.96.tar.gz

3) ./configure –prefix=/opt/zimbra/clamav-0.96 –with-user=zimbra –with-group=zimbra

I got

checking for cos in -lm… yes
checking for a supported version of gcc… no (4.1.0)
configure: error: gcc 4.1.0 is known to incorrectly compile upx.c. Upgrade your compiler to at least 4.1.1/4.1.2)

Mmm, now starts the difficult part. If I upgrade Suse IA64

I choose just to upgrade gcc

3.1) Download lastest gcc, from here: http://ftp.gnu.org/gnu/gcc/

So I choose the least traumatic one, for me. http://ftp.gnu.org/gnu/gcc/gcc-4.1.2/?C=S;O=D

You can also try native RPM files, may be you will have more luck than I http://fr2.rpmfind.net/linux/rpm2html/search.php?query=gcc&submit=Search+…

3.2) Extract with tar xvjf gcc-4.1.2.tar.bz2

3.3) cd Directory, and run ./configure

3.4)make

3.4.1) Now it says makeinfo doesn’t work. So I run yast, and search for “texinfo” package. Installed it

3.4.2) Run ./configure AGAIN

3.4.3) Ok, so again, I got another problem. This time the message was: stubs-32.h not found

3.4.4) make distclean

3.4.5)Run: CFLAGS=-m64 ./configure –disable-multilib

3.4.6) make

3.5) make install

Thank God, at last.

Ok, so back to where I left it: ClamAv, get ready!

And don’t forget to check gcc with gcc–version

/opt/clamav/clamav-0.96 # ls -l /usr/bin/gcc
lrwxrwxrwx 1 root root 18 Apr 18 11:56 /usr/bin/gcc -> /usr/local/bin/gcc

./configure –prefix=/opt/zimbra/clamav-0.96 –with-user=zimbra –with-group=zimbra

I got a problem with zlib, so I executed:

# yast -i zlib

# yast -i zlib-devel

And run configure again.

At Last! No errors! Really?

# make check

SKIP: check_clamav
PASS: check_freshclam.sh
PASS: check_sigtool.sh
SKIP: check_unit_vg.sh
PASS: check1_clamscan.sh
PASS: check2_clamd.sh
PASS: check3_clamd.sh
PASS: check4_clamd.sh
SKIP: check5_clamd_vg.sh
SKIP: check6_clamd_vg.sh
SKIP: check7_clamd_hg.sh
SKIP: check8_clamd_hg.sh
======================
All 6 tests passed
(6 tests were not run)
======================

# make install

Yeah! No errors!

So now you have a dir in /opt/zimbra/clamav-0.96

# ln -s clamav-0.96 clamav

# mkdir /opt/zimbra/clamav-0.96/db

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

# su zimbra

# zmcontrol stop

# zmcontrol start

# zmcontrol status

Host xxx

antispam                Running
antivirus               Running
ldap                    Running
logger                  Running
mailbox                 Running
mta                     Running
snmp                    Running
spell                   Running
stats                   Running

All right!

Another thing I tried:

If you want to update manually, you can download all rpms packages from Suse repositories, at this URL:

http://download.opensuse.org/repositories/devel:/gcc/SLE-10_SDK/x86_64/

Well, that URL is for AMD64, browse for your current one.

I downloaded all this packages:

/opt/clamav/clamav-0.96 # ls /opt/rpms/
cpp43-4.3.4_20091019-3.1.x86_64.rpm
gcc43-4.3.4_20091019-3.1.x86_64.rpm
gcc43-c++-4.3.4_20091019-3.1.x86_64.rpm
libgcc43-4.3.4_20091019-3.1.x86_64.rpm
libgomp43-4.3.4_20091019-3.1.x86_64.rpm
libmpfr1-2.4.2-7.1.x86_64.rpm
libstdc++43-4.3.4_20091019-3.1.x86_64.rpm
libstdc++43-devel-4.3.4_20091019-3.1.x86_64.rpm

And then run rpm -i –force *

References

http://wiki.zimbra.com/wiki/ClamAV_-_Updating_Version

http://www.clamav.net/lang/en/support/faq/faq-upgrade/

Share

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark
tabs-top


6 Comments »

  1. [...] This post was mentioned on Twitter by Zenware.net. Zenware.net said: New ZenBlog Post! ClamAv 0.96 engine update fix: http://zenware.net/blog/?p=103 http://bit.ly/9Bv4FH [...]

    comment-bottom
  2. Paus Leal Says:

    What a great resource!

    comment-bottom
  3. John Says:

    Hey I think you have a great blog going here, I found it on Bing and plan on returning regularly for the information that you all are providing.

    comment-bottom
  4. Berry J Says:

    One again, your articles is very good.thank you!very much.

    comment-bottom
  5. Siwees Says:

    I agree with your Blog and I will be back to check it more in the future so please keep up your work. I love your content & the way that you write. It looks like you’ve been doing this for a while now, how long have you been blogging for?

    comment-bottom
  6. Jonhatan B. Says:

    2013 at 4:11 am…

    CLAMAv Failed to start – Antivirus Engine Outdated – Emails deferred on Server – SLES10 – Zimbra HOWTO | Zenware Blog!…

    comment-bottom

RSS feed for comments on this post. TrackBack URL

Leave a comment