Eximstats Desc
eximstats – generates statistics from Exim mainlog files.

Reason for large eximststat DB

If the server has heavy email activity or if there is an abuse activity on server or if the server eximstat log rotation interval is too high then the DB can grow large in size. Whcih is the main cause behind eximstats db crashing

— > You can run command cat /var/log/exim_mainlog | eximstats . This will  Generate and display Exim stats from a logfile

Firstly check for any abuse attempts happening on server

Only if the DB is very large that is in GB size, attempt below or else the normal repair should work



1 ) Updating log rotation value in whm
WHM> tweak setting >  “The interval, in days, to retain Exim stats in the database” , suggested log rotation is 30days

2) Remove eximstats:

If you would like to remove and recreate eximstats database,


# mysql

> DROP DATABASE eximstats;
> CREATE DATABASE eximstats;
> quit

mysql eximstats < /var/cpanel/sql/eximstats.sql


3) Truncsating/deleting the DB values


disable eximstats from whm >> service manager

Login to mysql

mysql> use eximstats
mysql> delete from sends;
mysql> delete from smtp;
mysql> delete from failures;
mysql> delete from defers;

or if it is to Truncate

run truncate

>>truncate table smtp;
>>truncate table send; etc

root@server [~]# mysqlcheck -c eximstats
eximstats.defers OK
eximstats.failures OK
eximstats.sends OK
eximstats.smtp OK
root@jupiter [~]#

restart mysql and exim


  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: