Cacti, Direct Admin and exim

For some nice graph with some data from the hosthuis servers I use cacti to make these. The only requirement I really had that it had to be using SNMP, and it gave the current number of mails coming in and out. I found one made by Ian P. Christian at his personal blog.

Ian’s versions actually does perfectly what I want, however, his version is made for a normal exim install, and I use one from direct admin. So I needed to modify his version of the script a bit. First of all, I renamed several directory names (Like /var/run/exim4/ to/var/run/eximstats/) so there isnt confusion on what the directory is for. You might disagree with that ofcourse. However, if you do, pleaseĀ  let me know why (via a comment here).

Besides that I modified the regex to scan for the correct values in my log files. The orginal values didnt work out for me, as they were different in my host file. I also modified the order for the regexes. I first checkĀ  for greylisting, rejected and in/out. Lastly, in a seperate check I checked for spam and/or a virus. My opinion is that you get this way a better via of what percentage is actually spam or a virus. So you can see in the graph how many of the incoming emails are spam, and how many arent.

Note that this script expects that you use both clamav as greylisting. In case you don’t, you will not get any stats for this, and your graph might look a bit weird.

I have attached here the modified exim_stats.pl. You can find the required xml file at Ians blog.

You can find it here: exim_stats.pl Please note that I will try to provide some support, however only via comments at this post. I will not provide any support on this script via email.

Leave a Reply

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