4

which tool (script, nagios plugin, whatever) can I use to monitor tge rate of outgoing mails on a postfix mail server? I would like that script to calculate the number of outgoing mails per minute or every ten minutes or so and alert me by e-mail if that rate exceeds a predefined number, thus detecting possible spam waves.

3 Answers3

2

Munin has two plugins, postfix_mailstats and postfix_mailvolume, which should do what you want. It can also cope with thresholds, and if those are exceeded feed a notification through a NAGIOS server, or directly to anything else you care to plug into it.

MadHatter
  • 78,442
  • 20
  • 178
  • 229
  • Thanks for the answers. All helped me in on way or the other. In the end, I took the one core grep line for the munin plugin and wrapped my own alert script around it. – Michael Keller Oct 18 '12 at 19:53
  • 1
    Michael: glad we could help. Don't forget to accept your preferred answer by clicking on the "tick" outline next to it; it drives the SF reputation system for all concerned. – MadHatter Oct 19 '12 at 06:37
0

Cacti® - The Complete RRDTool-based Graphing Solution, can do that for you.

alexus
  • 12,342
  • 27
  • 115
  • 173
0

Check out qshape ; you should be able to awk sum params you want from qshape easily and send notice if needed. Periodic checks can be easily set up using cronjob.

Hrvoje Špoljar
  • 5,162
  • 25
  • 42