diff --git a/README.md b/README.md
index 4161ae3..df9c6b0 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# RBL Updater Suite
-This is the RBL Updater Suite version 0 alpha-1.3 (0-α1.3) by John Bradley (john@systemanomaly.com). The RBL Updater Suite is an Open Source suite of tools to be used in conjunction with rpsamd to help autogenerate a local realtime block list (RBL) not reliant on any external lists, such as spamhaus and the like.
+This is the RBL Updater Suite Version 1 Feature Complete (1-fc) by John Bradley (john@systemanomaly.com). The RBL Updater Suite is an Open Source suite of tools to be used in conjunction with rpsamd to help autogenerate a local realtime block list (RBL) not reliant on any external lists, such as spamhaus and the like.
This software is extremely experimental and may cause collateral damage on deliverability. USE AT YOUR OWN RISK.
@@ -183,21 +183,9 @@ Included is also an install script. As of this current version, it's not well te
# Latest Changes
-## 0-α1.3
+## Version 1 Feature Complete
- Updated documentation.
-- Removed versioning from config.
-- Added `list_bans`.
-- Graceful JSON failure in `report`.
-- Added ability to delete entries from `report`.
-- Added IP queue in `monitor` for JSON failure handling.
-- Dealt with some inconsistencies in how various ASN's list their information.
-- Added "provider" field to each table.
-- Reduced the information overload on `list_bans`.
-- Gave the ability to limit how many entries `list_bans` will output in the ip blocklist table.
-- Added logging to `monitor` and shifted informational output to `verbose` mode.
-- Added ability for `monitor` to import past logs and to begin the tail at the start of log file rather than end.
-- Updated `generate_list` with updated query similar to `list_bans` to not add to rspamd blocklists redundant IPs covered by network blocks.
-- Created a rudementary `install` script.
+- Feature complete release.
# Tested System Configuration
@@ -213,10 +201,9 @@ This project regular release cycle is not yet determined. Versioning is under th
| Version | Support Level | Released | End of Support | End of Life |
| ----------------------------------- | ---------------- | -------------- | -------------- | ------------- |
-| Version 1 Feature Complete (future) | Full Support | TBD | TBD | TBD |
-| Version 0 Alpha 1.3 (current) | Full Support | 2 May 2022 | TBD | TBD |
-| Version 0 Alpha 1.2 | Critical Support | 20 March 2022 | 6 April 2022 | TBD |
-| Version 0 Alpha 1.1 or Older | End of Life | 16 March 2022 | 20 March 2022 | 6 April 2022 |
+| Version 1 Feature Complete | Full Support | 27 July 2022 | TBD | TBD |
+| Version 0 Alpha 1.3 | Critical Support | 2 May 2022 | 27 July 2022 | TBD |
+| Version 0 Alpha 1.2 | End of Life | 20 March 2022 | 6 April 2022 | 27 July 2022 |
# Contributing
@@ -230,6 +217,6 @@ Primary Contributors
Thanks to [all who contributed](https://github.com/userjack6880/rbl_updater/graphs/contributors) and [have given feedback](https://github.com/userjack6880/rbl_updater/issues?q=is%3Aissue).
-# License
+# Licenses and Copyrights
-The RBL Updater Suite is released under GNU GPLv3. See `LICENSE`.
+Copyright © 2022 John Bradley (userjack6880). The RBL Updater Suite is released under GNU GPLv3. See `LICENSE`.
diff --git a/config.conf.pub b/config.conf.pub
index f9c0823..8c63678 100644
--- a/config.conf.pub
+++ b/config.conf.pub
@@ -1,4 +1,31 @@
-# RBL Updater Config File -----------------------------------------------------
+# -----------------------------------------------------------------------------
+#
+# RBL Updater Suite - a suite to update realtime blocklists for rspamd
+# Copyright (C) 2022 - John Bradley (userjack6880)
+#
+# config.conf
+# configuration for rbl_updater
+#
+# Available at: https://github.com/userjack6880/rbl_updater
+#
+# -----------------------------------------------------------------------------
+#
+# This file is part of the RBL Updater Suite for use with rspamd
+#
+# The RBL Updater Suite is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see .
+#
+# -----------------------------------------------------------------------------
# see README for instructions regarding these lists
$asnlist = '/etc/rspamd/local.d/maps/blockasn.map';
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index c545161..4976c93 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+## Version 1 Feature Complete
+- Updated documentation.
+- Feature complete release.
+
## 0-α1.3
- Updated documentation.
- Removed versioning from config.
diff --git a/docs/SECURITY.md b/docs/SECURITY.md
index 18186f4..563b431 100644
--- a/docs/SECURITY.md
+++ b/docs/SECURITY.md
@@ -22,5 +22,5 @@ Open DMARC Analyzer Version Security Support
| ---------------------------- | --------- | -------------- |
| Version 1 Feature Complete | YES | TBD |
| Version 0 Alpha 1.3 | YES | TBD |
-| Version 0 Alpha 1.2 | YES | TBD |
+| Version 0 Alpha 1.2 | NO | 27 July 2022 |
| Version 0 Alpha 1.1 or Older | NO | 6 April 2022 |
\ No newline at end of file
diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md
index 090b4c7..454149f 100644
--- a/docs/SUPPORT.md
+++ b/docs/SUPPORT.md
@@ -4,9 +4,9 @@ Due to the limited time available to developrs to maintain support, dates must b
| Version | Support Level | Released | End of Support | End of Life |
| ----------------------------------- | ---------------- | -------------- | -------------- | ------------- |
-| Version 1 Feature Complete (future) | Full Support | TBD | TBD | TBD |
-| Version 0 Alpha 1.3 (current) | Full Support | 2 May 2022 | TBD | TBD |
-| Version 0 Alpha 1.2 | Critical Support | 20 March 2022 | 6 April 2022 | TBD |
+| Version 1 Feature Complete | Full Support | 27 July 2022 | TBD | TBD |
+| Version 0 Alpha 1.3 | Critical Support | 2 May 2022 | 27 July 2022 | TBD |
+| Version 0 Alpha 1.2 | End of Life | 20 March 2022 | 6 April 2022 | 27 July 2022 |
| Version 0 Alpha 1.1 or Older | End of Life | 16 March 2022 | 20 March 2022 | 6 April 2022 |
# Support Levels
diff --git a/generate_list b/generate_list
index fc4300b..8012fa5 100755
--- a/generate_list
+++ b/generate_list
@@ -2,9 +2,11 @@
# -----------------------------------------------------------------------------
#
-# RBL Updater Suite
+# RBL Updater Suite - a suite to update realtime blocklists for rspamd
+# Copyright (C) 2022 - John Bradley (userjack6880)
+#
# generate_list
-# 2022 - John Bradley (userjack6880)
+# creates the plaintext file used by rspamd to block messages
#
# Available at: https://github.com/userjack6880/rbl_updater
#
@@ -36,7 +38,7 @@ use File::Basename;
use DBI;
# version number
-my $version = '0 alpha-1.3';
+my $version = '1 Feature Complete';
# basic settings --------------------------------------------------------------
my %opts = ();
diff --git a/install b/install
index d84b1f1..ba12ae0 100755
--- a/install
+++ b/install
@@ -2,9 +2,11 @@
# -----------------------------------------------------------------------------
#
-# RBL Updater Suite
+# RBL Updater Suite - a suite to update realtime blocklists for rspamd
+# Copyright (C) 2022 - John Bradley (userjack6880)
+#
# install
-# 2022 - John Bradley (userjack6880)
+# installation script
#
# Available at: https://github.com/userjack6880/rbl_updater
#
@@ -28,7 +30,7 @@
# -----------------------------------------------------------------------------
# version number
-VERSION='0 alpha-1.3';
+VERSION='1 Feature Complete';
# usage -----------------------------------------------------------------------
if [[ $1 == "--help" ]]
diff --git a/list_bans b/list_bans
index 4177796..38d68ec 100755
--- a/list_bans
+++ b/list_bans
@@ -2,9 +2,11 @@
# -----------------------------------------------------------------------------
#
-# RBL Updater Suite
+# RBL Updater Suite - a suite to update realtime blocklists for rspamd
+# Copyright (C) 2022 - John Bradley (userjack6880)
+#
# list_bans
-# 2022 - John Bradley (userjack6880)
+# used to list all current bans by the system
#
# Available at: https://github.com/userjack6880/rbl_updater
#
@@ -37,7 +39,7 @@ use DBI;
use Text::Table;
# version number
-my $version = '0 alpha-1.3';
+my $version = '1 Feature Complete';
# basic settings --------------------------------------------------------------
my %opts = ();
diff --git a/monitor b/monitor
index dce1ca3..f2e92c4 100755
--- a/monitor
+++ b/monitor
@@ -2,9 +2,12 @@
# -----------------------------------------------------------------------------
#
-# RBL Updater Suite
+# RBL Updater Suite - a suite to update realtime blocklists for rspamd
+# Copyright (C) 2022 - John Bradley (userjack6880)
+#
# monitor
-# 2022 - John Bradley (userjack6880)
+# monitors mail log for rejected emails and reports IP addresses to the
+# system
#
# Available at: https://github.com/userjack6880/rbl_updater
#
@@ -39,7 +42,7 @@ use LWP::Protocol::https;
use DBI;
# version number
-my $version = '0 alpha-1.3';
+my $version = '1 Feature Complete';
# basic settings --------------------------------------------------------------
my %opts = ();
diff --git a/report b/report
index b4b1446..4b65f57 100755
--- a/report
+++ b/report
@@ -2,9 +2,11 @@
# -----------------------------------------------------------------------------
#
-# RBL Updater Suite
+# RBL Updater Suite - a suite to update realtime blocklists for rspamd
+# Copyright (C) 2022 - John Bradley (userjack6880)
+#
# report
-# 2022 - John Bradley (userjack6880)
+# used to manually report and IP address or range
#
# Available at: https://github.com/userjack6880/rbl_updater
#
@@ -39,7 +41,7 @@ use LWP::Protocol::https;
use DBI;
# version number
-my $version = '0 alpha-1.3';
+my $version = '1 Feature Complete';
# basic settings --------------------------------------------------------------
my %opts = ();
diff --git a/systemd/rbl-updater.service b/systemd/rbl-updater.service
index d225085..e9ba607 100755
--- a/systemd/rbl-updater.service
+++ b/systemd/rbl-updater.service
@@ -1,3 +1,32 @@
+# -----------------------------------------------------------------------------
+#
+# RBL Updater Suite - a suite to update realtime blocklists for rspamd
+# Copyright (C) 2022 - John Bradley (userjack6880)
+#
+# rbl-updater.service
+# systemd service file for rbl_updater
+#
+# Available at: https://github.com/userjack6880/rbl_updater
+#
+# -----------------------------------------------------------------------------
+#
+# This file is part of the RBL Updater Suite for use with rspamd
+#
+# The RBL Updater Suite is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see .
+#
+# -----------------------------------------------------------------------------
+
[Unit]
Description=rbl_updater suite monitor
After=rspamd.service
diff --git a/update_asn_info b/update_asn_info
index 6d4d7b3..3b714f5 100755
--- a/update_asn_info
+++ b/update_asn_info
@@ -2,9 +2,11 @@
# -----------------------------------------------------------------------------
#
-# RBL Updater Suite
+# RBL Updater Suite - a suite to update realtime blocklists for rspamd
+# Copyright (C) 2022 - John Bradley (userjack6880)
+#
# update_asn_info
-# 2022 - John Bradley (userjack6880)
+# used to update SQL tables prior to Version 0 Alpha 1.3
#
# Available at: https://github.com/userjack6880/rbl_updater
#
@@ -39,16 +41,16 @@ use LWP::Protocol::https;
use DBI;
# version number
-my $version = '0 alpha-1.3';
+my $version = '1 Feature Complete';
# basic settings --------------------------------------------------------------
# usage sub -------------------------------------------------------------------
sub usage {
- print "\n".
- "\tUsage:\n".
- "\tThis script attempts to recitfy updated database configs where ASN and Provider are NULL\n".
- "\n";
+ print "\n".
+ "\tUsage:\n".
+ "\tThis script attempts to recitfy updated database configs where ASN and Provider are NULL\n".
+ "\n";
}
# load conf file --------------------------------------------------------------
@@ -69,87 +71,87 @@ my $dbh;
# BGP View Queries ------------------------------------------------------------
sub query_ip {
- my $ip = shift;
- my $result;
-
- my $ua = LWP::UserAgent->new(send_te => 0);
- $ua->agent("Mozilla/8.0"); # because cloudflare is a bitch
- my $req = HTTP::Request->new(
- GET => "https://api.bgpview.io/ip/$ip",
- [
- 'Content-Type' => "application/json"
- ]
- );
- my $res = $ua->request($req);
+ my $ip = shift;
+ my $result;
+
+ my $ua = LWP::UserAgent->new(send_te => 0);
+ $ua->agent("Mozilla/8.0"); # because cloudflare is a bitch
+ my $req = HTTP::Request->new(
+ GET => "https://api.bgpview.io/ip/$ip",
+ [
+ 'Content-Type' => "application/json"
+ ]
+ );
+ my $res = $ua->request($req);
if (substr($res->decoded_content,0,1) eq '<') {
$result->{error} = 1;
return $result;
}
- my $data = decode_json($res->decoded_content);
- $result->{prefix} = $data->{data}{rir_allocation}{prefix};
- $result->{prefix} = $data->{data}{prefixes}[0]{prefix} if not defined($result->{prefix});
- $result->{asn} = $data->{data}{prefixes}[0]{asn}{asn};
- $result->{provider} = $data->{data}{prefixes}[0]{asn}{description};
- $result->{provider} = $data->{data}{prefixes}[0]{description} if not defined($result->{provider});
- $result->{provider} = 'Unknown' if not defined($result->{prefix});
-
- return $result;
+ my $data = decode_json($res->decoded_content);
+ $result->{prefix} = $data->{data}{rir_allocation}{prefix};
+ $result->{prefix} = $data->{data}{prefixes}[0]{prefix} if not defined($result->{prefix});
+ $result->{asn} = $data->{data}{prefixes}[0]{asn}{asn};
+ $result->{provider} = $data->{data}{prefixes}[0]{asn}{description};
+ $result->{provider} = $data->{data}{prefixes}[0]{description} if not defined($result->{provider});
+ $result->{provider} = 'Unknown' if not defined($result->{prefix});
+
+ return $result;
}
sub query_range {
- my $range = shift;
- my $result;
-
- print "querying for $range\n";
-
- my $ua = LWP::UserAgent->new(send_te => 0);
- $ua->agent("Mozilla/8.0"); # because cloudflare is a bitch
- my $req = HTTP::Request->new(
- GET => "https://api.bgpview.io/prefix/$range",
- [
- 'Content-Type' => "application/json"
- ]
- );
- my $res = $ua->request($req);
+ my $range = shift;
+ my $result;
+
+ print "querying for $range\n";
+
+ my $ua = LWP::UserAgent->new(send_te => 0);
+ $ua->agent("Mozilla/8.0"); # because cloudflare is a bitch
+ my $req = HTTP::Request->new(
+ GET => "https://api.bgpview.io/prefix/$range",
+ [
+ 'Content-Type' => "application/json"
+ ]
+ );
+ my $res = $ua->request($req);
if (substr($res->decoded_content,0,1) eq '<') {
- print "found nothing\n";
+ print "found nothing\n";
$result->{error} = 1;
return $result;
- }
- my $data = decode_json($res->decoded_content);
- $result->{asn} = $data->{data}{asns}[0]{asn};
- $result->{provider} = $data->{data}{asns}[0]{description};
- $result->{provider} = $data->{data}{description_short} if not defined($result->{provider});
- $result->{provider} = $data->{data}{description_full} if not defined($result->{provider});
- $result->{provider} = 'Unknown' if not defined($result->{provider});
-
- return $result;
+ }
+ my $data = decode_json($res->decoded_content);
+ $result->{asn} = $data->{data}{asns}[0]{asn};
+ $result->{provider} = $data->{data}{asns}[0]{description};
+ $result->{provider} = $data->{data}{description_short} if not defined($result->{provider});
+ $result->{provider} = $data->{data}{description_full} if not defined($result->{provider});
+ $result->{provider} = 'Unknown' if not defined($result->{provider});
+
+ return $result;
}
sub query_asn {
- my $asn = shift;
- my $result;
-
- my $ua = LWP::UserAgent->new(send_te => 0);
- $ua->agent("Mozilla/8.0"); # because cloudflare is a bitch
- my $req = HTTP::Request->new(
- GET => "https://api.bgpview.io/asn/$asn",
- [
- 'Content-Type' => "application/json"
- ]
- );
- my $res = $ua->request($req);
+ my $asn = shift;
+ my $result;
+
+ my $ua = LWP::UserAgent->new(send_te => 0);
+ $ua->agent("Mozilla/8.0"); # because cloudflare is a bitch
+ my $req = HTTP::Request->new(
+ GET => "https://api.bgpview.io/asn/$asn",
+ [
+ 'Content-Type' => "application/json"
+ ]
+ );
+ my $res = $ua->request($req);
if (substr($res->decoded_content,0,1) eq '<') {
$result->{error} = 1;
return $result;
- }
- my $data = decode_json($res->decoded_content);
- $result->{provider} = $data->{data}{description_short};
- $result->{provider} = $data->{data}{description_full} if not defined($result->{provider});
- $result->{provider} = $data->{data}{name} if not defined($result->{provider});
- $result->{provider} = 'Unknown' if not defined($result->{provider});
-
- return $result;
+ }
+ my $data = decode_json($res->decoded_content);
+ $result->{provider} = $data->{data}{description_short};
+ $result->{provider} = $data->{data}{description_full} if not defined($result->{provider});
+ $result->{provider} = $data->{data}{name} if not defined($result->{provider});
+ $result->{provider} = 'Unknown' if not defined($result->{provider});
+
+ return $result;
}
# Begin Main Code -------------------------------------------------------------
@@ -168,72 +170,72 @@ my ($ip,$range,$asn,$provider);
# IP cascade
while (my @row = $dbh->selectrow_array(q{ SELECT INET_NTOA(ip4),ip4_net FROM ip_blocklist WHERE asn IS NULL AND provider IS NULL LIMIT 1; })) {
- $ip = $row[0];
- my $old_range = $row[1];
- my $result = query_ip($ip);
- if (defined $result->{error}) {
- print "JSON error\n";
- my $sth = $dbh->prepare(q{ UPDATE ip_blocklist SET provider = 'Unknown' WHERE ip4 = INET_ATON(?); });
- $sth->execute($ip);
- print "updated $ip with unknown\n";
- }
- else {
- $range = $result->{prefix};
- $asn = $result->{asn};
- $provider = $result->{provider};
-
- my $sth = $dbh->prepare(q{ UPDATE ip_blocklist SET ip4_net = ?, asn = ?, provider = ? where ip4_net = ?; });
- $sth->execute($range,$asn,$provider,$old_range);
-
- print "updated $range belonging to AS$asn, $provider - based on $ip\n";
- }
- $ip = '';
- $range = '';
- $asn = '';
- $provider = '';
+ $ip = $row[0];
+ my $old_range = $row[1];
+ my $result = query_ip($ip);
+ if (defined $result->{error}) {
+ print "JSON error\n";
+ my $sth = $dbh->prepare(q{ UPDATE ip_blocklist SET provider = 'Unknown' WHERE ip4 = INET_ATON(?); });
+ $sth->execute($ip);
+ print "updated $ip with unknown\n";
+ }
+ else {
+ $range = $result->{prefix};
+ $asn = $result->{asn};
+ $provider = $result->{provider};
+
+ my $sth = $dbh->prepare(q{ UPDATE ip_blocklist SET ip4_net = ?, asn = ?, provider = ? where ip4_net = ?; });
+ $sth->execute($range,$asn,$provider,$old_range);
+
+ print "updated $range belonging to AS$asn, $provider - based on $ip\n";
+ }
+ $ip = '';
+ $range = '';
+ $asn = '';
+ $provider = '';
}
# focus on networks now
while ($range = $dbh->selectrow_array(q{ SELECT ip4_net FROM ipnet_blocklist WHERE provider IS NULL LIMIT 1; })) {
- my $result = query_range($range);
- if (defined $result->{error}) {
- print "JSON error\n";
- my $sth = $dbh->prepare(q{ UPDATE ipnet_blocklist SET provider = 'Unknown' WHERE ip4_net = ? });
- $sth->execute($range);
-
- print "updated $range unknown\n";
- }
- else {
- $asn = $result->{asn};
- $provider = $result->{provider};
-
- my $sth = $dbh->prepare(q{ UPDATE ipnet_blocklist SET asn = ?, provider = ? WHERE ip4_net = ? });
- $sth->execute($asn,$provider,$range);
-
- print "updated $range belonging to AS$asn, $provider\n";
- }
- $range = '';
+ my $result = query_range($range);
+ if (defined $result->{error}) {
+ print "JSON error\n";
+ my $sth = $dbh->prepare(q{ UPDATE ipnet_blocklist SET provider = 'Unknown' WHERE ip4_net = ? });
+ $sth->execute($range);
+
+ print "updated $range unknown\n";
+ }
+ else {
+ $asn = $result->{asn};
+ $provider = $result->{provider};
+
+ my $sth = $dbh->prepare(q{ UPDATE ipnet_blocklist SET asn = ?, provider = ? WHERE ip4_net = ? });
+ $sth->execute($asn,$provider,$range);
+
+ print "updated $range belonging to AS$asn, $provider\n";
+ }
+ $range = '';
}
# finally update the ASNs
while ($asn = $dbh->selectrow_array(q{ SELECT asn FROM asn_blocklist WHERE provider IS NULL LIMIT 1; })) {
- my $result = query_asn($asn);
- if (defined $result->{error}) {
- print "JSON error\n";
- my $sth = $dbh->prepare(q{ UPDATE asn_blocklist SET provider = 'Unknown' WHERE asn = ? });
- $sth->execute($asn);
-
- print "updated $asn unknown\n";
- }
- else {
- $provider = $result->{provider};
-
- my $sth = $dbh->prepare(q{ UPDATE asn_blocklist SET provider = ? WHERE asn = ? });
- $sth->execute($provider,$asn);
-
- print "updated AS$asn, $provider\n";
- }
- $asn = '';
+ my $result = query_asn($asn);
+ if (defined $result->{error}) {
+ print "JSON error\n";
+ my $sth = $dbh->prepare(q{ UPDATE asn_blocklist SET provider = 'Unknown' WHERE asn = ? });
+ $sth->execute($asn);
+
+ print "updated $asn unknown\n";
+ }
+ else {
+ $provider = $result->{provider};
+
+ my $sth = $dbh->prepare(q{ UPDATE asn_blocklist SET provider = ? WHERE asn = ? });
+ $sth->execute($provider,$asn);
+
+ print "updated AS$asn, $provider\n";
+ }
+ $asn = '';
}
$dbh->disconnect;