Hi, mailops
I finished writing docs for my local monitoring and alerting system
Pyng: https://uptime.is/pyng/
One of the checks, DNSL - https://uptime.is/pyng/DNSL.html, is created
for RBL monitoring, and I'd like to share an working configuration to
monitor many zones for many addresses.
Pyng requies Python and Twisted, and DNSL check requires drill command.
Sendmail pager is using, well, sendmail. The configuration is self
explanatory.
<conf>
# -*- python -*-
pager = SendmailPager(
sender='RBL ALERT <postmaster@whatever>',
target='postmaster@whatever',
)
addresses = [
'127.0.0.1',
]
zones = [
'truncate.gbudb.net',
'zen.spamhaus.org',
'b.barracudacentral.org',
'ix.dnsbl.manitu.net',
'spamsources.fabel.dk',
'bl.mailspike.net',
'bl.mxrbl.com',
'psbl.surriel.com',
'bl.spamcop.net',
'bip.virusfree.cz',
'bad.virusfree.cz',
]
checks = []
for a in addresses:
for z in zones:
c = DNSL(
a, # address
z, # zone
server='localhost', # query local resolver
interval=900, # check every 900 seconds
alert=pager.alert(),
desc=f'{a} (RBL: {z})',
)
if z == 'zen.spamhaus.org': # ignore Spamhaus PBL
c.result = {'127.0.0.10', '127.0.0.11'}
checks.append(c)
</conf>
_______________________________________________
mailop mailing list
[email protected]
https://list.mailop.org/listinfo/mailop