diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/RBLList mezzanine_patched_smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/RBLList --- smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/RBLList 2016-04-17 22:59:01.784202182 +0200 +++ mezzanine_patched_smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/RBLList 2016-04-17 22:46:05.528253522 +0200 @@ -1 +1 @@ -bl.spamcop.net:dnsbl-1.uceprotect.net:dnsbl-2.uceprotect.net:psbl.surriel.com:zen.spamhaus.org +bl.spamcop.net,dnsbl-1.uceprotect.net,dnsbl-2.uceprotect.net,psbl.surriel.com,zen.spamhaus.org diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/SBLList mezzanine_patched_smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/SBLList --- smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/SBLList 2016-04-17 22:59:01.771202183 +0200 +++ mezzanine_patched_smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/SBLList 2016-04-17 22:49:16.864241529 +0200 @@ -1 +1 @@ -multi.surbl.org:black.uribl.com:rhsbl.sorbs.net +multi.surbl.org,black.uribl.com,rhsbl.sorbs.net diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/migrate/20RBLList mezzanine_patched_smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/migrate/20RBLList --- smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/migrate/20RBLList 2016-04-17 22:59:01.785202182 +0200 +++ mezzanine_patched_smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/migrate/20RBLList 2016-04-17 22:57:31.465208508 +0200 @@ -1,7 +1,27 @@ { $qpsmtpd = $DB->get('qpsmtpd'); return unless $qpsmtpd; - return unless $qpsmtpd->prop('RBLList'); + my $rbl = $qpsmtpd->prop('RBLList'); + return unless $rbl; + + my @rbl = (); + # Migrate to use , as separator instead of : + if ($rbl !~ m/,/){ + my @zones = split /[:]/, $rbl; + my $fqdn_re = qr/[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}/; + if (scalar @zones == 2 && $zones[1] !~ m/^$fqdn_re$/){ + # When we have only two entries, check if the second one looks like a valid hostname + # so if you only have something like dnsbl.foo.net:Sorry you are blacklisted + # it won't be migrated to dnsbl.foo.net,Sorry you are blacklisted + @rbl = ($rbl); + } + else{ + @rbl = @zones; + } + } + else{ + @rbl = split /[,]/, $rbl; + } my %obsolete = map { $_ => 1} qw( combined.njabl.org @@ -10,7 +30,6 @@ dnsbl.ahbl.org ); - @rbl = grep { ! $obsolete{$_} } split /[,:]/, $qpsmtpd->prop('RBLList'); - $qpsmtpd->set_prop('RBLList', join ':', @rbl); + @rbl = grep { ! $obsolete{$_} } @rbl; + $qpsmtpd->set_prop('RBLList', join ',', @rbl); } - diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/migrate/20SBLLIST mezzanine_patched_smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/migrate/20SBLLIST --- smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/migrate/20SBLLIST 2016-04-17 22:59:01.780202182 +0200 +++ mezzanine_patched_smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/migrate/20SBLLIST 2016-04-17 22:58:59.578202338 +0200 @@ -1,7 +1,27 @@ { $qpsmtpd = $DB->get('qpsmtpd'); return unless $qpsmtpd; - return unless $qpsmtpd->prop('SBLList'); + my $sbl = $qpsmtpd->prop('SBLList'); + return unless $sbl; + + my @sbl = (); + # Migrate to use , as separator instead of : + if ($sbl !~ m/,/){ + my @zones = split /[:]/, $sbl; + my $fqdn_re = qr/[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}/; + if (scalar @zones == 2 && $zones[1] !~ m/^$fqdn_re$/){ + # When we have only two entries, check if the second one looks like a valid hostname + # so if you only have something like rhsbl.foo.net:Sorry you are blacklisted + # it won't be migrated to rhsbl.foo.net,Sorry you are blacklisted + @sbl = ($sbl); + } + else{ + @sbl = @zones; + } + } + else{ + @sbl = split /[,]/, $sbl; + } my %obsolete = map { $_ => 1} qw( blackhole.securitysage.com @@ -13,6 +33,6 @@ ex.dnsbl.org ); - @sbl = grep { !$obsolete{$_} } split /[,:]/, $qpsmtpd->prop('SBLList'); - $qpsmtpd->set_prop('SBLList', join ':', @sbl); + @sbl = grep { !$obsolete{$_} } @sbl; + $qpsmtpd->set_prop('SBLList', join ',', @sbl); } diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-2.4.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/dnsbl_zones/10RBLList mezzanine_patched_smeserver-qpsmtpd-2.4.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/dnsbl_zones/10RBLList --- smeserver-qpsmtpd-2.4.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/dnsbl_zones/10RBLList 2005-10-07 03:21:58.000000000 +0200 +++ mezzanine_patched_smeserver-qpsmtpd-2.4.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/dnsbl_zones/10RBLList 2016-04-17 22:56:24.849213118 +0200 @@ -1,5 +1,5 @@ { - my @rbllist = split /[,:]/, ${qpsmtpd}{RBLList} || ''; + my @rbllist = split /[,]/, ${qpsmtpd}{RBLList} || ''; return "# No RBLs are defined" unless (scalar @rbllist); diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-2.4.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/rhsbl_zones/10SBLList mezzanine_patched_smeserver-qpsmtpd-2.4.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/rhsbl_zones/10SBLList --- smeserver-qpsmtpd-2.4.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/rhsbl_zones/10SBLList 2006-02-05 15:38:30.000000000 +0100 +++ mezzanine_patched_smeserver-qpsmtpd-2.4.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/rhsbl_zones/10SBLList 2016-04-17 22:48:55.823242870 +0200 @@ -1,5 +1,5 @@ { - my @rbllist = split /[,:]/, ${qpsmtpd}{SBLList} || ''; + my @rbllist = split /[,]/, ${qpsmtpd}{SBLList} || ''; return "# No SBLs are defined" unless (scalar @rbllist);