cPanel: Berkeley DB error

I found out this error in /var/log/exim_mainlog. When trying to fix the Exim database using /scripts/exim_tidydb, the same error occurred:

$ tail -f /var/log/exim_mainlog
2011-09-08 10:08:13 1R1cV2-0003Yq-J2 Berkeley DB error: page 40: illegal page type or format
2011-09-08 10:08:13 1R1cV2-0003Yq-J2 Berkeley DB error: PANIC: Invalid argument
2011-09-08 10:08:13 1R1cV2-0003Yq-J2 Berkeley DB error: fatal region error detected; run recovery

This can be fixed by the following steps by re-updating Exim and clear up the exim

1. Backup /etc/exim.conf and /var/spool/exim/db :

$ cp /etc/exim.conf /etc/exim.conf.bak
$ cp /var/spool/exim/db /var/spool/exim/db.bak

2. Stop Exim:

$ service exim stop

3. Remove all files under /var/spool/exim/db to make sure we get the new Exim database :

$ rm -Rfv /var/spool/exim/db/*

4.Update Exim:

$ /scripts/eximup --force

5. Restore back the configuration of Exim:

$ cp /etc/exim.conf.bak /etc/exim.conf

6. Restart Exim to load our configuration:

$ service exim restart