skip to Main Content

Today I was reviewing my server and the Eximstats database dissapeared! but I see like a new design so I assumed that Cpanel/WHM was autoupdated.

I thought it was a mistake and i have to just repair the database, but the email delivery log still works, so I do not know where this information is being pulled from.

I tried repairing the database and the repair tool deletes the database! Is like a new structure!

I am wondering if anybody knows if there is any version of exim that does not use eximstats database, if the information is pulled from a different database or file, and how to read again this database.

I need that database as I had an app developed using this database.

Thanks for your help!

2

Answers


  1. The eximstats database structure is as follows (the default tables as per cPanel/WHM install):

    -- MySQL dump 10.15  Distrib 10.0.30-MariaDB, for Linux (x86_64)
    --
    -- Host: dbv1.gazduire.ro    Database: eximstats
    -- ------------------------------------------------------
    -- Server version   5.5.27
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
    /*!40103 SET TIME_ZONE='+00:00' */;
    /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
    
    --
    -- Table structure for table `defers`
    --
    
    DROP TABLE IF EXISTS `defers`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `defers` (
      `mailtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `msgid` char(16) NOT NULL DEFAULT '',
      `email` char(255) NOT NULL DEFAULT '',
      `transport_method` char(45) NOT NULL DEFAULT 'remote_smtp',
      `host` char(255) NOT NULL DEFAULT '',
      `ip` char(46) NOT NULL DEFAULT '',
      `message` char(240) NOT NULL DEFAULT '',
      `router` char(65) NOT NULL DEFAULT '',
      `deliveryuser` char(30) NOT NULL DEFAULT '',
      `deliverydomain` char(255) NOT NULL DEFAULT '',
      `unique_id` int(11) unsigned NOT NULL DEFAULT '1',
      PRIMARY KEY (`mailtime`,`msgid`,`email`,`unique_id`),
      KEY `email_mailtime_index` (`email`,`mailtime`),
      KEY `msgid_mailtime_index` (`msgid`,`mailtime`),
      KEY `deliverydomain_mailtime_index` (`deliverydomain`,`mailtime`),
      KEY `deliveryuser_mailtime_index` (`deliveryuser`,`mailtime`),
      KEY `email_deliveryuser_mailtime_index` (`email`,`deliveryuser`,`mailtime`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    /*!40101 SET character_set_client = @saved_cs_client */;
    
    --
    -- Table structure for table `failures`
    --
    
    DROP TABLE IF EXISTS `failures`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `failures` (
      `mailtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `msgid` char(16) NOT NULL DEFAULT '',
      `email` char(255) NOT NULL DEFAULT '',
      `transport_method` char(45) NOT NULL DEFAULT 'remote_smtp',
      `host` char(255) NOT NULL DEFAULT '',
      `ip` char(46) NOT NULL DEFAULT '',
      `message` char(240) NOT NULL DEFAULT '',
      `router` char(65) NOT NULL DEFAULT '',
      `deliveryuser` char(30) NOT NULL DEFAULT '',
      `deliverydomain` char(255) NOT NULL DEFAULT '',
      `unique_id` int(11) unsigned NOT NULL DEFAULT '1',
      PRIMARY KEY (`mailtime`,`msgid`,`email`,`unique_id`),
      KEY `email_mailtime_index` (`email`,`mailtime`),
      KEY `deliverydomain_mailtime_index` (`deliverydomain`,`mailtime`),
      KEY `deliveryuser_mailtime_index` (`deliveryuser`,`mailtime`),
      KEY `email_deliveryuser_mailtime_index` (`email`,`deliveryuser`,`mailtime`),
      KEY `msgid_mailtime_index` (`msgid`,`mailtime`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    /*!40101 SET character_set_client = @saved_cs_client */;
    
    --
    -- Table structure for table `sends`
    --
    
    DROP TABLE IF EXISTS `sends`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `sends` (
      `mailtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `msgid` char(16) NOT NULL DEFAULT '',
      `email` char(255) NOT NULL DEFAULT '',
      `processed` enum('0','1','2','3') NOT NULL DEFAULT '0',
      `user` char(30) NOT NULL DEFAULT '',
      `size` int(11) unsigned NOT NULL DEFAULT '0',
      `ip` char(46) NOT NULL DEFAULT '',
      `auth` char(30) NOT NULL DEFAULT '',
      `host` char(255) NOT NULL DEFAULT '',
      `domain` char(255) NOT NULL DEFAULT '',
      `localsender` enum('0','1') NOT NULL DEFAULT '1',
      `spamscore` double NOT NULL DEFAULT '0',
      `unique_id` int(11) unsigned NOT NULL DEFAULT '1',
      PRIMARY KEY (`mailtime`,`msgid`,`email`,`unique_id`),
      KEY `mailtime_domain_user_msgid_index` (`mailtime`,`domain`,`user`,`msgid`),
      KEY `user_mailtime_index` (`user`,`mailtime`),
      KEY `msgid_user_index` (`msgid`,`user`),
      KEY `domain_user_mailtime_index` (`domain`,`user`,`mailtime`),
      KEY `email_mailtime_user_index` (`email`,`mailtime`,`user`),
      KEY `user_mailtime_spamscore_ip_index` (`user`,`mailtime`,`spamscore`,`ip`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    /*!40101 SET character_set_client = @saved_cs_client */;
    
    --
    -- Table structure for table `smtp`
    --
    
    DROP TABLE IF EXISTS `smtp`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `smtp` (
      `mailtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `msgid` char(16) NOT NULL DEFAULT '',
      `email` char(255) NOT NULL DEFAULT '',
      `processed` enum('0','1','2','3') NOT NULL DEFAULT '0',
      `transport_method` char(45) NOT NULL DEFAULT 'remote_smtp',
      `transport_is_remote` enum('0','1','2','3') NOT NULL DEFAULT '1',
      `host` char(255) NOT NULL DEFAULT '',
      `ip` char(46) NOT NULL DEFAULT '',
      `deliveredto` char(255) NOT NULL DEFAULT '',
      `router` char(65) NOT NULL DEFAULT '',
      `deliveryuser` char(30) NOT NULL DEFAULT '',
      `deliverydomain` char(255) NOT NULL DEFAULT '',
      `counteddomain` char(255) NOT NULL DEFAULT '',
      `countedtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `countedhour` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `unique_id` int(11) unsigned NOT NULL DEFAULT '1',
      PRIMARY KEY (`mailtime`,`msgid`,`email`,`deliveredto`,`router`,`unique_id`),
      KEY `msgid_index` (`msgid`),
      KEY `deliverydomain_mailtime_index` (`deliverydomain`,`mailtime`),
      KEY `deliveryuser_mailtime_index` (`deliveryuser`,`mailtime`),
      KEY `email_mailtime_index` (`email`,`mailtime`),
      KEY `email_deliveryuser_mailtime_index` (`email`,`deliveryuser`,`mailtime`),
      KEY `processed_transport_is_remote_index` (`processed`,`transport_is_remote`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    /*!40101 SET character_set_client = @saved_cs_client */;
    /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
    
    /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
    /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
    /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
    /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
    
    -- Dump completed on 2017-04-24 23:12:19
    

    This is taken from a WHM 11.52 server. It seems that in the latest cPanel/WHM version the database is not there anymore. I suggest you open a support ticket to cPanel and ask.

    Meanwhile you can create the database from the table structure I have provided. Not sure if exim will log anything into it though since if they removed the database then the exim configuration could have changed and this could lead in no logging to the database.

    Login or Signup to reply.
  2. Since version 64, cPanel moved eximstats data from MySQL to SQLite3. The new database is located in /var/cpanel/eximstats_db.sqlite3 and the tables are slightly changed. The time is now recorded as unix timestamps and a few things are gone (like the unique ids which were mostly pointless anyway). Hope this helps.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search