Empty Mail Delivery Report – WHM

Hello folks,

Do you ever faced problem with empty Mail delivery reports in WHM? Recently I’ve faced similar problem in one of our client’s server. Don’t worry folks. Here is the solution which worked for me.

You can find Mail Delivery Reports by navigating to Home >> Email >> Mail Delivery Reports in WHM.

First of all, make sure eximstats is enabled in Service Manager. To enable it in Service Manager follow the steps below:

1. Log into WHM.
2. Navigate to Home >> Service Configuration >> Service Manager
3. Check the box in the left side of Eximstats.

scr1

4. Click on the Save button at the bottom of the page.

Even after enabling eximstats, are you still facing problem regarding empty Mail delivery reports? Then, continue reading 🙂

Now, we can take a look at the tailwatchd logs in the location /usr/local/cpanel/logs/tailwatchd_log.

Here are the error logs that I’ve obtained in my case:

[2898] [2015-01-27 00:44:22 -0500] [Cpanel::TailWatch::Eximstats] [SQLERR] Could not execute query, logging SQL to /var/cpanel/sql DBD::mysql::st execute failed: Unknown column 'unique_id' in 'field list' at /usr/local/cpanel/Cpanel/TailWatch/Eximstats.pm line 1037,  line 1463. [2898] [2015-01-27 00:44:29 -0500] [Cpanel::TailWatch::Eximstats] [ERR] SQL Failed with error (Unknown column 'unique_id' in 'field list'): INSERT DELAYED INTO defers (mailtime,msgid,email,transport_method,message,host,ip,router,deliveryuser,deliverydomain,unique_id) VALUES(FROM_UNIXTIME('1422337469'),'1YF4C5-0002zT-CF',[email protected]',NULL,'host lookup did not complete','lookup',NULL,'lookuphost','','','334') [2898] [2015-01-27 00:44:29 -0500] [Cpanel::TailWatch::Eximstats] [SQLERR] Could not execute query, logging SQL to /var/cpanel/sql DBD::mysql::st execute failed: Unknown column 'unique_id' in 'field list' at /usr/local/cpanel/Cpanel/TailWatch/Eximstats.pm line 1037,  line 1465. [2898] [2015-01-27 00:44:29 -0500] [Cpanel::TailWatch::Eximstats] [ERR] SQL Failed with error (Unknown column 'unique_id' in 'field list'): INSERT DELAYED INTO defers (mailtime,msgid,email,transport_method,message,host,ip,router,deliveryuser,deliverydomain,unique_id) VALUES(FROM_UNIXTIME('1422337469'),'1YFg2Y-0005UH-2Z',[email protected]','remote_smtp','Connection refused',NULL,NULL,'lookuphost','','','335')

It looks like eximstats database has been corrupted and as a result logging was completely broken. Follow the steps below to fix this:

Enter MySQL

#mysql

Now you’ll be in MySQL prompt. Enter into Eximstats database.

mysql>use eximstats;

Then truncate sends, errors, defers and failures tables. Truncating means resetting the eximstats database tables.

mysql>truncate table sends;
mysql>truncate table errors;
mysql>truncate table failures;
mysql>truncate table defers;

Once this is done, please execute the following from command line. This is to update eximstats db.

#/usr/local/cpanel/bin/updateeximstats

From now onwards, you’ll get Mail delivery reports in WHM!

Also read:
1, Unable to establish a PHP session – PHPMyAdmin error
2, How to enable Varnish in cPanel server
3, Easy way to install Memcached and memcache in a cPanel server

Heba Habeeb

Working as a Linux Server Admin, Infopark, Cochin, Kerala.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *