Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed usage()

  • Loading branch information...
commit 1aed6a6af54719dc434549a5cc74a674158b7da7 1 parent 08c6397
Julien Vehent authored

Showing 2 changed files with 14 additions and 13 deletions. Show diff stats Hide diff stats

  1. +12 10 postscreen_stats.py
  2. +2 3 rbl-check.sh
22 postscreen_stats.py
@@ -19,30 +19,32 @@ def usage():
19 19 postscreen_stats.py
20 20 parses postfix logs to compute statistics on postscreen activity
21 21
22   - usage: postscreen_stats.py <-y|--year> <-r|--report|-f|--full>
  22 + usage: postscreen_stats.py -f mail.log
23 23
24   - <-a|--action> action filter with operators | and &
  24 + <-a|--action=> action filter with operators | and &
25 25 ex. 'PREGREET&DNSBL|HANGUP' => ((PREGREET and DNSBL) or HANGUP)
26 26 ex. 'HANGUP&DNSBL|PREGREET&DNSBL'
27 27 => ((HANGUP and DNSBL) or (PREGREET and DNSBL)
28 28
29   - <-f|--file> log file to parse (default to /var/log/maillog)
  29 + <-f|--file=> log file to parse (default to /var/log/maillog)
30 30
31   - <-g|--geoloc> /!\ slow ! ip geoloc against hostip.info (default disabled)
  31 + <-g> /!\ slow ! ip geoloc against hostip.info (default disabled)
32 32
33   - <--geofile> path to a maxmind geolitecity.dat. if specified, with the -g switch
34   - the script uses the maxmind data instead of hostip.info (faster)
  33 + <--geofile=> path to a maxmind geolitecity.dat. if specified, with the -g switch
  34 + the script uses the maxmind data instead of hostip.info (faster)
35 35
36 36 <-G> when using --geofile, use the pygeoip module instead of the GeoIP module
37 37
38   - <-i|--ip> filters the results on a specific IP
  38 + <-i|--ip=> filters the results on a specific IP
39 39
40   - <--mapdest> path to a destination HTML file that will display a Google Map of the result
  40 + <--mapdest=> path to a destination HTML file that will display a Google Map of the result
41 41 /!\ Require the geolocation, preferably with --geofile
42 42
43   - <-r|--report> report mode {short|full|ip|none} (default to short)
  43 + <-r|--report=> report mode {short|full|ip|none} (default to short)
44 44
45   - <-y|--year> select the year of the logs (default to current year)
  45 + <-y|--year=> select the year of the logs (default to current year)
  46 +
  47 + example: $ ./postscreen_stats.py -f maillog.3 -r short -y 2011 --geofile=../geoip/GeoIPCity.dat -G --mapdest=postscreen_report_2012-01-15.html
46 48
47 49 Julien Vehent (http://1nw.eu/!j) - https://github.com/jvehent/Postscreen-Stats
48 50 '''
5 rbl-check.sh 100644 → 100755
... ... @@ -1,7 +1,7 @@
1   -#!/usr/bin/env bash
  1 +#!/bin/bash
2 2 DEBUG="$1"
3 3 # replace the SRV list with your own machines
4   -SRV="mail.example.net mail.example.com"
  4 +SRV="mail.example.com mail.example.net"
5 5 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"
6 6 for server in $SRV
7 7 do
@@ -24,4 +24,3 @@ do
24 24 fi
25 25 done
26 26 done
27   -

0 comments on commit 1aed6a6

Please sign in to comment.
Something went wrong with that request. Please try again.