cpanel 升级后的 Eximstats dissapeared/eliminated

Eximstats dissapeared/eliminated after cpanel upgrade

今天我正在检查我的服务器,Eximstats 数据库消失了!但我觉得这是一个新设计,所以我假设 Cpanel/WHM 是自动更新的。

我以为这是一个错误,我只需要修复数据库,但电子邮件发送日志仍然有效,所以我不知道这些信息是从哪里提取的。

我试过修复数据库,修复工具删除了数据库!就像一个新的结构!

我想知道是否有人知道是否有任何版本的 exim 不使用 eximstats 数据库,信息是否来自不同的数据库或文件,以及如何再次读取该数据库。

我需要那个数据库,因为我有一个使用这个数据库开发的应用程序。

感谢您的帮助!

eximstats数据库结构如下(默认tables按照cPanel/WHM安装):

-- 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

这取自 WHM 11.52 服务器。似乎在最新的 cPanel/WHM 版本中,数据库不再存在。我建议你打开一个支持票到 cPanel 并询问。

同时,您可以根据我提供的 table 结构创建数据库。不确定 exim 是否会将任何内容记录到其中,因为如果他们删除了数据库,那么 exim 配置可能已经更改,这可能导致没有日志记录到数据库。

自版本 64 起,cPanel 将 eximstats 数据从 MySQL 移至 SQLite3。新数据库位于 /var/cpanel/eximstats_db.sqlite3,表略有变化。时间现在被记录为 unix 时间戳,并且一些东西消失了(比如唯一的 id,它们基本上毫无意义)。希望这有帮助。