├── VERSION ├── .gitattributes ├── .htaccess ├── .gitignore ├── tasks ├── reset_database.txt ├── hMSLogConfig.dist.ps1 ├── hMSLogHandler.ps1 ├── hMSLogFunctions.ps1 ├── hMSLogStatsCurrent.ps1 └── hMSLogSetupTasks.ps1 ├── README.md ├── foo.php ├── header.php ├── iframemsg.php ├── foot.php ├── includes ├── old │ ├── dialsettings.php │ ├── chartRejectionsPerHour.php │ ├── chartConnectionsPerHour.php │ ├── chartRejectionsPerDay.php │ ├── chartConnectionsPerDay.php │ ├── dialTodayMsgs.php │ ├── dialTodayReject.php │ ├── dialTodayConnect.php │ ├── dialTodayMsgsJQ.php │ ├── dialTodayRejectJQ.php │ └── dialTodayConnectJQ.php ├── mapData.php ├── datepicker.php ├── chartConnectionsPerHourCJS.php ├── chartRejectionsPerHourCJS.php ├── datepicker_logon.php ├── chartTodayConnections.php ├── chartConnectionsPerDayCJS.php ├── chartRejectionsPerDayCJS.php ├── chartTodayRejections.php ├── dialTodayMsgsCG.php ├── dialTodayConnectCG.php └── dialTodayRejectCG.php ├── link.php ├── config.dist.php ├── css ├── iframe.css ├── svgMap.min.css ├── svgMap.css └── stylesheet.css ├── iframechecksa.php ├── head.php ├── login.php ├── extra.php ├── functions_log.php ├── unsubscribe.php ├── logviewer.php ├── iframebayes.php ├── unread.php ├── iframemovetospam.php ├── iframemovetoinbox.php ├── iframeeml.php ├── iframelogviewer.php ├── logsearch.php ├── msg.php ├── messages.php ├── autoban.php ├── index.php ├── ids.php └── js └── chartjs-plugin-datalabels.min.js /VERSION: -------------------------------------------------------------------------------- 1 | 3.14 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | RedirectMatch 403 ^/tasks/.*$ 2 | RedirectMatch 403 ^/events/.*$ 3 | RedirectMatch 403 ^/temp/.*$ -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore config file 2 | /config.php 3 | /tasks/hMSLogConfig.ps1 4 | /tasks/Temp 5 | /tasks/DBError-* 6 | /temp/* 7 | /statsCurrentData.php 8 | /statsData.php 9 | /test/ -------------------------------------------------------------------------------- /tasks/reset_database.txt: -------------------------------------------------------------------------------- 1 | DELETE FROM hm_log_attr; 2 | ALTER TABLE hm_log_attr AUTO_INCREMENT = 1; 3 | DELETE FROM hm_log_awstats; 4 | ALTER TABLE hm_log_awstats AUTO_INCREMENT = 1; 5 | DELETE FROM hm_log_ip; 6 | DELETE FROM hm_log_logon; 7 | ALTER TABLE hm_log_logon AUTO_INCREMENT = 1; 8 | DELETE FROM hm_log_msg; 9 | ALTER TABLE hm_log_msg AUTO_INCREMENT = 1; 10 | DELETE FROM hm_log_smtp; 11 | ALTER TABLE hm_log_smtp AUTO_INCREMENT = 1; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hMailServer-MySQL-Connection-Log 2 | 3 | Searchable Event Log for hMailServer 4 | 5 | # Prerequisites: 6 | * MySQL 7 | * Apache/IIS with PHP 8 | * hMailServer 5.7 (or custom build w/newer features) 9 | 10 | # Instructions: 11 | 12 | 1) Clone to web accessible folder 13 | 2) Rename `/config.dist.php` and `/tasks/hMSLogConfig.dist.ps1` and fill in the variables 14 | 3) Run `/tasks/hMSLogSetupTasks.ps1` to create database tables and scheduled tasks 15 | 4) Use examples in `/events/EventHandlers.vbs` to modify your own EventHandlers.vbs -------------------------------------------------------------------------------- /foo.php: -------------------------------------------------------------------------------- 1 | 17 |