Skip to content

Script to provide a snmp extend with statistics for Exim/Postfix/Sendmail and many scanners (Virus/Spam)

License

Notifications You must be signed in to change notification settings

dinde/net-snmp-extend-mailstats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snmp-extend-mxstats

Script to provide a snmp extend with statistics for Exim/Postfix/Sendmail and many scanners (Virus/Spam) supporting DKIM/SPF/Greylist.

Used OID: UCD-SNMP-MIB::ucdExperimental.69 mx-stats (.1.3.6.1.4.1.2021.13.69). It's not used anywhere and who do not like 69 ? :)

Suppported:

MTA:

  • Exim4: Tested against exim4/sa-exim/spamassassin/dkim/greylist
  • Postfix: Tested against postfix/amavisd/spamassassin/postgrey
  • Sendmail: Not tested (yet).

Scanners:

  • amavisd
  • Vexira
  • Antivir Mailgate
  • avcheck
  • Spamassassin
  • clamd
  • dspam
  • spampd
  • drweb-postfix
  • drweb
  • sa-exim
  • BlackHole
  • MailScanner
  • clamsmtpd
  • clamav-milter
  • smtp-vilter
  • Antivir milter
  • bogofilter

Installation

  • 1/ Download it !
  • 2/ Edit the configuration block specifying where the logs files are located.
  • {vim,nano} /usr/sbin/mxstats.pl
  • 3/ Run it to ensure it is working correctly before placing the cron
  • 4/ Adapt your cron execution time according your rrdstep. Usualy 300seconds step so cron will be 5mn.

  • 5/ Extend your snmp by adding the following line to the end of: /etc/snmp/snmpd.conf extend .1.3.6.1.4.1.2021.13.69 mx-stats /bin/cat /var/tmp/mxstats

  • 6/ Test it ! It should return 25 values ! snmpwalk -v2c -c public YOUR.SERVER.TLD .1.3.6.1.4.1.2021.13.69

Installation of Opennms files

There is 2 flavours of datacollection file.

  • mailstats-gauge.xml which uses a gauge and need the cron to be sync with your data collection time (example: rrdstep 300 = 5mn = cron 5mn)
  • mailstats-counter.xml which uses a counter64 instead and does not need any sync on cron.

TODO before release of version 1

  • Find more log samples and integrate the missing regexp.
  • Implementation of IMAP(S)/POP3(S) statistics collections for Dovecot 1.x/2.x, Courier, Cyrus, Zarafa Gateway.
  • More tests ...
  • A new screenshot up to date for the wiki page

Contribution

This script makes sense if people using it add more and more regexp to fit their needs. This will make it naturaly better. Don't hesitate to request pull on github.

About

Script to provide a snmp extend with statistics for Exim/Postfix/Sendmail and many scanners (Virus/Spam)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages