MRTG on bernstein rblsmtpd
I started to use bernstein rblsmtpd, and my spam almost desapeared. But I wanted to create a graphic with the efect that rblsmtpd had in my connection.
To archieve this I could use only the normal logs generated by rblsmtpd, but that only logs the blocked connections.
I wanted to generate graphics like this one, and with the blocked connections only, I couldn't do this.
So I patch rblsmtpd to log a Verifying line when starting each host verification, and a Blocking line when blocking a host.
The patch can be found here. It's just two more lines to generate the pretended log.
I changed my QMailLDAP Init script, so the logs generated by rblsmtpd are written through multilog.
Then I created a perl script that parses multilog log files, and return the number of blocked and nonblocked hosts in the last 5 minutes.
This perl script can be found here.
The graphic don't shows the final data. The graphic shows in the green area all verified hosts. The final version of my-rblsmtpd-analise.pl generates values that will correspond to nonblocked hosts in the green area.
Hope you enjoy this.
To archieve this I could use only the normal logs generated by rblsmtpd, but that only logs the blocked connections.
I wanted to generate graphics like this one, and with the blocked connections only, I couldn't do this.
So I patch rblsmtpd to log a Verifying line when starting each host verification, and a Blocking line when blocking a host.
The patch can be found here. It's just two more lines to generate the pretended log.
I changed my QMailLDAP Init script, so the logs generated by rblsmtpd are written through multilog.
Then I created a perl script that parses multilog log files, and return the number of blocked and nonblocked hosts in the last 5 minutes.
This perl script can be found here.
The graphic don't shows the final data. The graphic shows in the green area all verified hosts. The final version of my-rblsmtpd-analise.pl generates values that will correspond to nonblocked hosts in the green area.
Hope you enjoy this.
Posted in rblsmtpd information script patch |
Post a Comment