Store smtp connection statistics in the database and send authentication attempts info to network intelligence
Ref #532
Please review !767 (merged) first.
Introduces a new database which contains statistics of all incoming smtp connections used by the MUAs that try to authenticate (send smtp AUTH
command), either succeeding or not.
Also sends such statistics, alongside with the IP addresses (which might be an issue in terms of privacy!)
This is a big change that also does some refactoring, introducing a new package pkg/dbrunner
, which is a Runner
that groups database actions in transactions delimited by timeouts.
The code was extracted from deliverydb
and is now reused in the new package connectionstats
which has a new database with some basic statistics about smtp connections, provided by postfix.
Edited by Leandro Santiago