darold / sendmailanalyzer

Sendmail log Analyzer is a tool to monitor sendmail usage and generate HTML and graph reports. It reports all you ever wanted to know about email trafic on your network. You can also use it in ISP environment with per domain and per mailbox report.
http://sendmailanalyzer.darold.net/
GNU General Public License v3.0
76 stars 13 forks source link

Virtual doman support, wider regex for DNSBLs #42

Closed thinksilicon closed 6 years ago

thinksilicon commented 7 years ago

Added support for virtual domains, so sendmailanalyzer can determine if a domain is internal or external. This extends the LOCAL_DOMAIN configuration option and is intended for mailserver which have a dynamic configuration from a SQL-like database. Uses DBI, so many different databases are supported.

darold commented 6 years ago

The PR can not be applied like this. I have applied the first commit about DNSBL parsing without change but the second patch have been rewritten in commit 39bf967.

Now the SQL query must return the list of virtual domain and it call just one time into the LOCAL_DOMAIN array. The first version has several problem, it keeps the connection to the database a very long time and the SQL query is executed for each message received. The last problem conduct to high performances lost on very active server and it is enough to look at the virtual domain list at startup of sa_cache or sa_report.cgi scripts. However thanks for the PR and please test the new version to see if everything is correct at your side.