Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 940717 Details for
Bug 1133357
postscreen DNSBL rejections not counted
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
dnsblcount perl script
dnsblcount (text/plain), 2.56 KB, created by
Harald Reindl
on 2014-09-24 08:50:57 UTC
(
hide
)
Description:
dnsblcount perl script
Filename:
MIME Type:
Creator:
Harald Reindl
Created:
2014-09-24 08:50:57 UTC
Size:
2.56 KB
patch
obsolete
>#!/usr/bin/perl > ># dnsblcount ># version 20061111 ># (c) 2004, 2005, 2006 Jorey Bump > ># URL ># http://www.joreybump.com/code/dnsblcount/ > ># Description: ># Counts DNSBL rejections in Postfix log > ># Usage: ># dnsblcount /path/to/maillog ># dnsblcount /path/to/maillog1 /path/to/maillog2 ># dnsblcount /path/to/maillogs* ># grep "search string" /path/to/maillog | dnsblcount > ># Sample crontab: ># 30 5 * * * /usr/local/sbin/dnsblcount /var/log/maillog | mail -s "$HOSTNAME - DNSBL Count" postmaster > ># Sample Postfix 1.1 log lines: ># Mar 6 06:52:03 mail postfix/smtpd[11873]: reject: RCPT from unknown[208.61.231.102]: 554 Service unavailable; [208.61.231.102] blocked using bl.spamcop.net, reason: Blocked - see http://www.spamcop.net/bl.shtml?208.61.231.102; from=<bob@example.net> to=<rob@example.com> ># Mar 13 05:47:51 mail postfix/smtpd[28269]: reject: RCPT from mail68.example.info[66.63.191.68]: 554 Service unavailable; [66.63.191.68] blocked using sbl.spamhaus.org, reason: http://www.spamhaus.org/SBL/sbl.lasso?query=SBL12057; from=<bob@example.net> to=<rob@example.com> > ># Sample Postfix 2.1 log line: ># Apr 17 13:49:07 mail postfix/smtpd[18143]: NOQUEUE: reject: RCPT from c-7209e055.1111-2-64736c10.cust.bredbandsbolaget.se[85.224.9.114]: 554 Service unavailable; Client host [85.224.9.114] blocked using bl.spamcop.net; Blocked - see http://www.spamcop.net/bl.shtml?85.224.9.114; from=<haqyhakox@example.com> to=<bob@example.net> proto=ESMTP helo=<c-7209e055.1111-2-64736c10.cust.example.com> > ># Sample postfix 2.3 log line: ># Dec 25 05:41:28 mail postfix/smtpd[14586]: NOQUEUE: reject: RCPT from unknown[202.43.175.151]: 554 5.7.1 Service unavailable; Client host [202.43.175.151] blocked using bl.spamcop.net; Blocked - see http://www.spamcop.net/bl.shtml?202.43.175.151; from=<iglkjlpioed@example.com> to=<bob@example.net> proto=SMTP helo=<mail.example.com> > ># Begin: >use strict; > >my ( $dnsbl, $dnsbltotal, $ip, $length, $line, $max, > %dnsblcount >); > >my $rule = "="; >my $totstr = "Total DNSBL rejections:"; >$max = length($totstr); > ># read line from stdin >while ($line = <>) { > if ($line =~ /(\[.*\]) blocked using ([^\s]*)(,|;) /) { > $ip = $1; > $dnsbl = $2; > $dnsblcount{$dnsbl} += 1; > $dnsbltotal += 1; > } >} > >foreach $dnsbl (sort keys %dnsblcount) { > $length = length($dnsbl); > if ( $length > $max ) { > $max = $length > } >} > >foreach $dnsbl (sort { $dnsblcount{$b} <=> $dnsblcount{$a} } keys(%dnsblcount)) { > printf "%-${max}s %7s\n", $dnsbl, $dnsblcount{$dnsbl}; >} > >foreach (1..($max + 10)) { > printf "%s", $rule; >} > >print "\n"; > >printf "%-${max}s %8s\n", $totstr, $dnsbltotal; > >1;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1133357
: 940717