Permalink
Browse files

fixed usage()

  • Loading branch information...
1 parent 08c6397 commit 1aed6a6af54719dc434549a5cc74a674158b7da7 @jvehent committed Jan 18, 2012
Showing with 14 additions and 13 deletions.
  1. +12 −10 postscreen_stats.py
  2. +2 −3 rbl-check.sh
View
22 postscreen_stats.py
@@ -19,30 +19,32 @@ def usage():
postscreen_stats.py
parses postfix logs to compute statistics on postscreen activity
- usage: postscreen_stats.py <-y|--year> <-r|--report|-f|--full>
+ usage: postscreen_stats.py -f mail.log
- <-a|--action> action filter with operators | and &
+ <-a|--action=> action filter with operators | and &
ex. 'PREGREET&DNSBL|HANGUP' => ((PREGREET and DNSBL) or HANGUP)
ex. 'HANGUP&DNSBL|PREGREET&DNSBL'
=> ((HANGUP and DNSBL) or (PREGREET and DNSBL)
- <-f|--file> log file to parse (default to /var/log/maillog)
+ <-f|--file=> log file to parse (default to /var/log/maillog)
- <-g|--geoloc> /!\ slow ! ip geoloc against hostip.info (default disabled)
+ <-g> /!\ slow ! ip geoloc against hostip.info (default disabled)
- <--geofile> path to a maxmind geolitecity.dat. if specified, with the -g switch
- the script uses the maxmind data instead of hostip.info (faster)
+ <--geofile=> path to a maxmind geolitecity.dat. if specified, with the -g switch
+ the script uses the maxmind data instead of hostip.info (faster)
<-G> when using --geofile, use the pygeoip module instead of the GeoIP module
- <-i|--ip> filters the results on a specific IP
+ <-i|--ip=> filters the results on a specific IP
- <--mapdest> path to a destination HTML file that will display a Google Map of the result
+ <--mapdest=> path to a destination HTML file that will display a Google Map of the result
/!\ Require the geolocation, preferably with --geofile
- <-r|--report> report mode {short|full|ip|none} (default to short)
+ <-r|--report=> report mode {short|full|ip|none} (default to short)
- <-y|--year> select the year of the logs (default to current year)
+ <-y|--year=> select the year of the logs (default to current year)
+
+ example: $ ./postscreen_stats.py -f maillog.3 -r short -y 2011 --geofile=../geoip/GeoIPCity.dat -G --mapdest=postscreen_report_2012-01-15.html
Julien Vehent (http://1nw.eu/!j) - https://github.com/jvehent/Postscreen-Stats
'''
View
5 rbl-check.sh 100644 → 100755
@@ -1,7 +1,7 @@
-#!/usr/bin/env bash
+#!/bin/bash
DEBUG="$1"
# replace the SRV list with your own machines
-SRV="mail.example.net mail.example.com"
+SRV="mail.example.com mail.example.net"
RBL="bl.spamcop.net cbl.abuseat.org b.barracudacentral.org dnsbl.invaluement.com ddnsbl.internetdefensesystems.com dnsbl.sorbs.net http.dnsbl.sorbs.net dul.dnsbl.sorbs.net misc.dnsbl.sorbs.net smtp.dnsbl.sorbs.net socks.dnsbl.sorbs.net spam.dnsbl.sorbs.net web.dnsbl.sorbs.net zombie.dnsbl.sorbs.net dnsbl-1.uceprotect.net dnsbl-2.uceprotect.net dnsbl-3.uceprotect.net pbl.spamhaus.org sbl.spamhaus.org xbl.spamhaus.org zen.spamhaus.org bl.spamcannibal.org psbl.surriel.com ubl.unsubscore.com dnsbl.njabl.org combined.njabl.org rbl.spamlab.com dnsbl.ahbl.org ircbl.ahbl.org dyna.spamrats.com noptr.spamrats.com spam.spamrats.com cbl.anti-spam.org.cn cdl.anti-spam.org.cn dnsbl.inps.de drone.abuse.ch httpbl.abuse.ch dul.ru korea.services.net short.rbl.jp virus.rbl.jp spamrbl.imp.ch wormrbl.imp.ch virbl.bit.nl rbl.suresupport.com dsn.rfc-ignorant.org ips.backscatterer.org spamguard.leadmon.net opm.tornevall.org netblock.pedantic.org black.uribl.com grey.uribl.com multi.surbl.org ix.dnsbl.manitu.net tor.dan.me.uk rbl.efnetrbl.org relays.mail-abuse.org blackholes.mail-abuse.org rbl-plus.mail-abuse.org dnsbl.dronebl.org access.redhawk.org db.wpbl.info rbl.interserver.net query.senderbase.org bogons.cymru.com"
for server in $SRV
do
@@ -24,4 +24,3 @@ do
fi
done
done
-

0 comments on commit 1aed6a6

Please sign in to comment.