ERROR: Malformed database for clamd

In cPanel server if you are getting the following error when restarting exim, then follow the steps below:

# /etc/init.d/exim restart
Shutting down clamd:                                       [FAILED]
Shutting down exim:                                        [  OK  ]
Shutting down spamd:                                       [  OK  ]
Starting clamd: LibClamAV Error: cli_dbgets: Invalid data or internal buffer too small
LibClamAV Error: cli_tgzload: File main.mdb not correctly loaded
LibClamAV Error: Can't load /usr/share/clamav/main.cld: Malformed database
LibClamAV Error: cli_loaddbdir(): error loading database /usr/share/clamav/main.cld
ERROR: Malformed database
                                                           [FAILED]
Starting exim:                                             [  OK  ]
0 processes (antirelayd) sent signal 9
/usr/local/cpanel/scripts/update_sa_rules: running in background

To fix this error Do freshclam.

#freshclam

Restart exim

#/etc/init.d/exim restart

This will fix the problem.