Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/matteocorti/check_rbl
Browse files Browse the repository at this point in the history
  • Loading branch information
matteocorti committed Oct 29, 2024
2 parents d320ceb + 07ce76d commit 4f7a2d7
Show file tree
Hide file tree
Showing 22 changed files with 78 additions and 86 deletions.
1 change: 1 addition & 0 deletions .codespell-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
konstant
5 changes: 5 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
check-filenames =
check-hidden =
skip = .git,check_rbl-*,Makefile,blib,*.bak,check_rbl.ini,inc
ignore-words = .codespell-ignore
16 changes: 16 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# GitHub Action to automate the identification of common misspellings in text files.
# https://github.com/codespell-project/actions-codespell
# https://github.com/codespell-project/codespell
name: codespell
on:
push:
paths-ignore:
pull_request:

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@master
5 changes: 0 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
fail-fast: false
matrix:
distro:
- 'centos:7'
- 'fedora:39'
- 'fedora:40'
include:
Expand All @@ -27,10 +26,6 @@ jobs:
- distro: 'fedora:39'
pre: >-
dnf install -y sudo perl-Module-Install perl-Monitoring-Plugin perl-Perl-Critic rpm-build openssh-clients
- distro: 'centos:7'
pre: >-
yum install -y epel-release &&
yum install -y sudo perl-Module-Install perl-Monitoring-Plugin perl-Test-Simple perl-Perl-Critic rpm-build openssh-clients
steps:
- name: Git clone repository
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
fail-fast: false
matrix:
distro:
- 'centos:7'
- 'fedora:39'
- 'fedora:40'
include:
Expand All @@ -32,11 +31,6 @@ jobs:
- distro: 'fedora:39'
pre: >-
dnf install -y sudo perl-Module-Install perl-Readonly perl-Monitoring-Plugin perl-Perl-Critic rpm-build perl-Net-DNS perl-Data-Validate-Domain perl-Net-IP perl-Data-Validate-IP perl-Capture-Tiny
- distro: 'centos:7'
pre: >-
yum install -y epel-release &&
yum install -y sudo perl-Module-Install perl-Readonly perl-Monitoring-Plugin perl-Test-Simple perl-Perl-Critic rpm-build perl-Net-DNS perl-Net-IP perl-Data-Validate-IP perl-App-cpanminus perl-Capture-Tiny &&
sudo cpanm Data::Validate::Domain
steps:
- name: Git clone repository
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Matteo Corti <[email protected]>

Thanks:

* Many thanks to Elan Ruusam�e <[email protected]> for the improved parallel support and several fixes
* Many thanks to Elan Ruusamäe <[email protected]> for the improved parallel support and several fixes
* Many thanks to Victor V Kudlak <[email protected]> for the parallel support
* Many thanks to Jan Kantert <[email protected]> for the whitelisting support
* Many thanks to Nick Nicholas <[email protected]> for IPv6 support
Expand All @@ -14,4 +14,4 @@ Thanks:
* Many thanks to waja (https://github.com/waja) for the dnsbl.inps.de patch
* Many thanks to Dalfo (https://github.com/DalfoCentreon) for the installation instructions
* Many thanks to Bas Couwenberg (https://github.com/sebastic) for the --authoritative patch
* Many thanks to Peter Bieringer ([email protected]) for the Fedora 38 and EPEL 9 patch
* Many thanks to Peter Bieringer ([email protected]) for the Fedora 38 and EPEL 9 patch and the 'debuglog' patch
2 changes: 1 addition & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2009-2023 Matteo Corti
Copyright (c) 2009-2024 Matteo Corti
Copyright (c) 2010 Elan Ruusamae
Copyright (c) 2009 ETH Zurich

Expand Down
10 changes: 9 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2024-09-20 Matteo Corti <[email protected]>

* check_rbl: Fixed a problem with a debug subroutine

2024-08-04 Matteo Corti <[email protected]>

* removed bondsender.org as it's not working anymore

2024-03-27 Matteo Corti <[email protected]>

* check_rbl: Removed spamtrap.drbl.drand.net
Expand Down Expand Up @@ -141,7 +149,7 @@
* Version 1.2.2
* check_rbl: specified the dependency on Nagios::Plugin > 0.31
(earlier versions caused parameter parsing errors,
thanks to Elan Ruusam�e)
thanks to Elan Ruusamäe)

2010-07-05 Matteo Corti <[email protected]>

Expand Down
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ If yoi want to install the dependencies manually (tested on RHEL8, with reposito

dnf install perl-Capture-Tiny perl-Data-Validate-IP perl-IO perl-Monitoring-Plugin perl-Net-DNS perl-Net-IP perl-Readonly perl-Socket

The perl libray `Data::Validate::Domain` is not avaliable (_yet_) as package, so you have to install it trough CPAN.
The perl library `Data::Validate::Domain` is not available (_yet_) as package, so you have to install it through CPAN.

Please check with '`perl -V`' the best value for PERL5LIB.

Expand Down
2 changes: 2 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.codespell-ignore
.codespellrc
AUTHORS
build_rpm.sh
Changes
Expand Down
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ WriteMakefile(
INSTALLSCRIPT => '/usr/lib/nagios/plugins/contrib',
INSTALLSITESCRIPT => '/usr/lib/nagios/plugins/contrib',
MAN1PODS => { 'check_rbl.pod' =>'blib/man1/check_rbl.1', },
MAN3PODS => { },
MAN3PODS => { },
);

3 changes: 2 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
2024-09-20: 1.7.4 - Fixed a problem with a debug subroutine
2024-03-27: 1.7.3 - Removed spamtrap.drbl.drand.net
2023-06-29: 1.7.2 - Fixed confliting command line option
2023-06-29: 1.7.2 - Fixed conflicting command line option
2023-04-10: 1.7.1 - updated the list of servers
2022-08-08: 1.7.0 - new option to specify nameserver to use for the DNS queries
2022-05-12: 1.6.4 - updated the list of servers
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

&copy; Matteo Corti, ETH Zurich, 2009-2012

&copy; Matteo Corti, 2009-2023
&copy; Matteo Corti, 2009-2024

see AUTHORS for the complete list of contributors

Expand All @@ -25,7 +25,7 @@ Needs ```Data::Validate::Domain``` 0.12 to handle fully qualified host names wit
## Example

```
check_rbl -H example.org -t 60 -c 1 -w 1 -s cbl.abuseat.org -s spamsources.fabel.dk -s mail-abuse.blacklist.jippg.org -s korea.services.net -s ix.dnsbl.manitu.net -s psbl.surriel.com -s dyna.spamrats.com -s noptr.spamrats.com -s spam.spamrats.com -s dnsbl.sorbs.net -s spam.dnsbl.sorbs.net -s bl.spamcop.net -s pbl.spamhaus.org -s sbl.spamhaus.org -s xbl.spamhaus.org -s db.wpbl.info -s access.redhawk.org -s dnsbl.kempt.net -s rbl.schulte.org -s sbl-xbl.spamhaus.org -s smtp.dnsbl.sorbs.net -s web.dnsbl.sorbs.net -s zen.spamhaus.org -s zombie.dnsbl.sorbs.net -s dnsbl.dronebl.org -s dnsbl.spfbl.net -s spam.dnsbl.anonmails.de -s z.mailspike.net
check_rbl -H example.org -t 60 -c 1 -w 1 -s cbl.abuseat.org -s spamsources.fabel.dk -s mail-abuse.blacklist.jippg.org -s korea.services.net -s ix.dnsbl.manitu.net -s psbl.surriel.com -s dyna.spamrats.com -s noptr.spamrats.com -s spam.spamrats.com -s bl.spamcop.net -s pbl.spamhaus.org -s sbl.spamhaus.org -s xbl.spamhaus.org -s db.wpbl.info -s access.redhawk.org -s dnsbl.kempt.net -s rbl.schulte.org -s sbl-xbl.spamhaus.org -s zen.spamhaus.org -s dnsbl.dronebl.org -s dnsbl.spfbl.net -s spam.dnsbl.anonmails.de -s z.mailspike.net
```

### See also
Expand Down
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Removed spamtrap.drbl.drand.net
Fixed a problem with a debug subroutine
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.3
1.7.4
6 changes: 3 additions & 3 deletions check_rbl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package main;
use strict;
use warnings;

our $VERSION = '1.7.3';
our $VERSION = '1.7.4';

use Capture::Tiny qw(capture);
use Data::Validate::Domain qw(is_hostname);
Expand Down Expand Up @@ -144,14 +144,14 @@ sub init_dns_resolver {

if ( defined $options->nameserver ) {

# If the nameserver is invalid Net::DNS::Resover prints an error message on STDERR: we want to suppress it
# If the nameserver is invalid Net::DNS::Resolver prints an error message on STDERR: we want to suppress it
# see: https://stackoverflow.com/questions/73270724/how-to-handle-errors-while-setting-the-name-server-with-netdns

my ( $stdout, $stderr, @servers ) =
capture { $resolver->nameservers( $options->nameserver ); };

if ( @servers == 0 ) {
debuglog("DNS nameserver error: $stderr");
debug("DNS nameserver error: $stderr");
$plugin->nagios_exit( Monitoring::Plugin->CRITICAL,
'Invalid nameserver ' . $options->nameserver );
}
Expand Down
27 changes: 0 additions & 27 deletions check_rbl.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ server=abuse.spfbl.net
server=access.redhawk.org
server=all.s5h.net
server=all.spamrats.com
server=aspews.ext.sorbs.net
server=auth.spamrats.com
server=b.barracudacentral.org
server=backscatter.spameatingmonkey.net
Expand All @@ -31,7 +30,6 @@ server=black.junkemailfilter.com
server=blackholes.five-ten-sg.com
server=blacklist.sci.kun.nl
server=blacklist.woody.ch
server=block.dnsbl.sorbs.net
server=bsb.spamlookup.net
server=cbl.abuseat.org
server=cidr.bl.mcafee.com
Expand All @@ -48,86 +46,64 @@ server=dnsbl.isx.fr
server=dnsbl.justspam.org
server=dnsbl.kempt.net
server=dnsbl.madavi.de
server=dnsbl.sorbs.net
server=dnsbl.spfbl.net
server=dnsblchile.org
server=dnswl.spfbl.net
server=drone.abuse.ch
server=dsn.rfc-ignorant.org
server=duinv.aupads.org
server=dul.dnsbl.sorbs.net
server=dyna.spamrats.com
server=escalations.dnsbl.sorbs.net
server=forbidden.icm.edu.pl
server=free.v4bl.org
server=gl.suomispam.net
server=hil.habeas.com
server=http.dnsbl.sorbs.net
server=images.rbl.msrbl.net
server=ip4.bl.zenrbl.pl
server=iprbl.mailcleaner.net
server=ips.whitelisted.org
server=ix.dnsbl.manitu.net
server=korea.services.net
server=krn.korumail.com
server=l1.spews.dnsbl.sorbs.net
server=l2.bbfh.ext.sorbs.net
server=l2.spews.dnsbl.sorbs.net
server=light.dnsbl.brukalai.lt
server=list.dnswl.org
server=mail-abuse.blacklist.jippg.org
server=misc.dnsbl.sorbs.net
server=mtawlrev.dnsbl.rediris.es
server=multi.surbl.org
server=nbl.0spam.org
server=netblockbl.spamgrouper.to
server=netscan.rbl.blockedservers.com
server=new.spam.dnsbl.sorbs.net
server=niprbl.mailcleaner.net
server=noptr.spamrats.com
server=old.spam.dnsbl.sorbs.net
server=origin.asn.spameatingmonkey.net
server=orvedb.aupads.org
server=pbl.spamhaus.org
server=phishing.rbl.msrbl.net
server=plus.bondedsender.org
server=postmaster.rfc-ignorant.org
server=problems.dnsbl.sorbs.net
server=proxies.dnsbl.sorbs.net
server=proxy.bl.gweep.ca
server=proxy.block.transip.nl
server=psbl.surriel.com
server=query.bondedsender.org
server=rbl.abuse.ro
server=rbl.blockedservers.com
server=rbl.inter.net
server=rbl.interserver.net
server=rbl.ircbl.org
server=rbl.lugh.ch
server=rbl.metunet.com
server=rbl.rbldns.ru
server=rbl.schulte.org
server=rbl.spamlab.com
server=recent.spam.dnsbl.sorbs.net
server=relays.bl.gweep.ca
server=relays.bl.kunden.de
server=relays.dnsbl.sorbs.net
server=relays.nether.net
server=rep.mailspike.net
server=reputation-ip.rbl.scrolloutf1.com
server=reputation-ns.rbl.scrolloutf1.com
server=residential.block.transip.nl
server=safe.dnsbl.sorbs.net
server=sbl-xbl.spamhaus.org
server=sbl.spamdown.org
server=sbl.spamhaus.org
server=score.spfbl.net
server=singular.ttk.pte.hu
server=smtp.dnsbl.sorbs.net
server=socks.dnsbl.sorbs.net
server=spam.abuse.ch
server=spam.dnsbl.anonmails.de
server=spam.dnsbl.sorbs.net
server=spam.pedantic.org
server=spam.rbl.blockedservers.com
server=spam.rbl.msrbl.net
Expand All @@ -148,13 +124,10 @@ server=url.0spam.org
server=virbl.bit.nl
server=virus.rbl.msrbl.net
server=wadb.isipp.com
server=web.dnsbl.sorbs.net
server=web.rbl.msrbl.net
server=white.dnsbl.brukalai.lt
server=whois.rfc-ignorant.org
server=wl.mailspike.net
server=wormrbl.imp.ch
server=xbl.spamhaus.org
server=z.mailspike.net
server=zen.spamhaus.org
server=zombie.dnsbl.sorbs.net
4 changes: 1 addition & 3 deletions check_rbl.pod
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ DAMAGES.

=head1 ACKNOWLEDGMENTS

=encoding iso-8859-1

Elan Ruusam�e for the improved parallel support and several fixes
Elan Ruusamäe for the improved parallel support and several fixes

Victor V Kudlak for parallel support

Expand Down
5 changes: 4 additions & 1 deletion check_rbl.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define version 1.7.3
%define version 1.7.4
%define release 0
%define sourcename check_rbl
%define packagename nagios-plugins-check-rbl
Expand Down Expand Up @@ -57,6 +57,9 @@ rm -rf %{buildroot}
%{_mandir}/man1/%{sourcename}.1*

%changelog
* Fri Sep 20 2024 Matteo Corti <[email protected]> - 1.7.4-0
- Update to 1.7.4

* Wed Mar 27 2024 Matteo Corti <[email protected]> - 1.7.3-0
- Update to 1.7.3

Expand Down
23 changes: 23 additions & 0 deletions t/02_codespell.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;

# Ensure codespell is available
my $codespell = `which codespell`;
if (!$codespell) {
plan skip_all => 'codespell is not installed';
exit;
}

# Run codespell
my $output = `codespell 2>&1`;
if ($? == 0) {
pass('No spelling errors found by codespell');
} else {
fail('Spelling errors found by codespell');
diag($output);
}

done_testing();
Loading

0 comments on commit 4f7a2d7

Please sign in to comment.