/[smeserver]/rpms/smeserver-qpsmtpd/sme10/smeserver-qpsmtpd-2.6.0-change_rbl_sbl_list_separator.patch
ViewVC logotype

Annotation of /rpms/smeserver-qpsmtpd/sme10/smeserver-qpsmtpd-2.6.0-change_rbl_sbl_list_separator.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sun Apr 17 21:15:41 2016 UTC (8 years, 6 months ago) by vip-ire
Branch: MAIN
CVS Tags: smeserver-qpsmtpd-2_6_0-25_el7_sme, smeserver-qpsmtpd-2_6_0-24_el7_sme, smeserver-qpsmtpd-2_6_0-15_el7_sme, smeserver-qpsmtpd-2_6_0-17_el7_sme, smeserver-qpsmtpd-2_6_0-14_el7_sme, smeserver-qpsmtpd-2_6_0-16_el7_sme, smeserver-qpsmtpd-2_6_0-13_el7_sme, smeserver-qpsmtpd-2_6_0-19_el7_sme, smeserver-qpsmtpd-2_6_0-20_el7_sme, smeserver-qpsmtpd-2_6_0-23_el7_sme, smeserver-qpsmtpd-2_6_0-27_el7_sme, smeserver-qpsmtpd-2_6_0-22_el7_sme, smeserver-qpsmtpd-2_6_0-11_el7_sme, smeserver-qpsmtpd-2_6_0-12_el7_sme, smeserver-qpsmtpd-2_6_0-21_el7_sme, smeserver-qpsmtpd-2_6_0-26_el7_sme
* Sun Apr 17 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-11.sme
- Change separator for SBList and RBLlist from : to , [SME: 8484]

1 vip-ire 1.1 diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/RBLList mezzanine_patched_smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/RBLList
2     --- smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/RBLList 2016-04-17 22:59:01.784202182 +0200
3     +++ mezzanine_patched_smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/RBLList 2016-04-17 22:46:05.528253522 +0200
4     @@ -1 +1 @@
5     -bl.spamcop.net:dnsbl-1.uceprotect.net:dnsbl-2.uceprotect.net:psbl.surriel.com:zen.spamhaus.org
6     +bl.spamcop.net,dnsbl-1.uceprotect.net,dnsbl-2.uceprotect.net,psbl.surriel.com,zen.spamhaus.org
7     diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/SBLList mezzanine_patched_smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/SBLList
8     --- smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/SBLList 2016-04-17 22:59:01.771202183 +0200
9     +++ mezzanine_patched_smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/SBLList 2016-04-17 22:49:16.864241529 +0200
10     @@ -1 +1 @@
11     -multi.surbl.org:black.uribl.com:rhsbl.sorbs.net
12     +multi.surbl.org,black.uribl.com,rhsbl.sorbs.net
13     diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/migrate/20RBLList mezzanine_patched_smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/migrate/20RBLList
14     --- smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/migrate/20RBLList 2016-04-17 22:59:01.785202182 +0200
15     +++ mezzanine_patched_smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/migrate/20RBLList 2016-04-17 22:57:31.465208508 +0200
16     @@ -1,7 +1,27 @@
17     {
18     $qpsmtpd = $DB->get('qpsmtpd');
19     return unless $qpsmtpd;
20     - return unless $qpsmtpd->prop('RBLList');
21     + my $rbl = $qpsmtpd->prop('RBLList');
22     + return unless $rbl;
23     +
24     + my @rbl = ();
25     + # Migrate to use , as separator instead of :
26     + if ($rbl !~ m/,/){
27     + my @zones = split /[:]/, $rbl;
28     + my $fqdn_re = qr/[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}/;
29     + if (scalar @zones == 2 && $zones[1] !~ m/^$fqdn_re$/){
30     + # When we have only two entries, check if the second one looks like a valid hostname
31     + # so if you only have something like dnsbl.foo.net:Sorry you are blacklisted
32     + # it won't be migrated to dnsbl.foo.net,Sorry you are blacklisted
33     + @rbl = ($rbl);
34     + }
35     + else{
36     + @rbl = @zones;
37     + }
38     + }
39     + else{
40     + @rbl = split /[,]/, $rbl;
41     + }
42    
43     my %obsolete = map { $_ => 1} qw(
44     combined.njabl.org
45     @@ -10,7 +30,6 @@
46     dnsbl.ahbl.org
47     );
48    
49     - @rbl = grep { ! $obsolete{$_} } split /[,:]/, $qpsmtpd->prop('RBLList');
50     - $qpsmtpd->set_prop('RBLList', join ':', @rbl);
51     + @rbl = grep { ! $obsolete{$_} } @rbl;
52     + $qpsmtpd->set_prop('RBLList', join ',', @rbl);
53     }
54     -
55     diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/migrate/20SBLLIST mezzanine_patched_smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/migrate/20SBLLIST
56     --- smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/migrate/20SBLLIST 2016-04-17 22:59:01.780202182 +0200
57     +++ mezzanine_patched_smeserver-qpsmtpd-2.6.0/root/etc/e-smith/db/configuration/migrate/20SBLLIST 2016-04-17 22:58:59.578202338 +0200
58     @@ -1,7 +1,27 @@
59     {
60     $qpsmtpd = $DB->get('qpsmtpd');
61     return unless $qpsmtpd;
62     - return unless $qpsmtpd->prop('SBLList');
63     + my $sbl = $qpsmtpd->prop('SBLList');
64     + return unless $sbl;
65     +
66     + my @sbl = ();
67     + # Migrate to use , as separator instead of :
68     + if ($sbl !~ m/,/){
69     + my @zones = split /[:]/, $sbl;
70     + my $fqdn_re = qr/[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}/;
71     + if (scalar @zones == 2 && $zones[1] !~ m/^$fqdn_re$/){
72     + # When we have only two entries, check if the second one looks like a valid hostname
73     + # so if you only have something like rhsbl.foo.net:Sorry you are blacklisted
74     + # it won't be migrated to rhsbl.foo.net,Sorry you are blacklisted
75     + @sbl = ($sbl);
76     + }
77     + else{
78     + @sbl = @zones;
79     + }
80     + }
81     + else{
82     + @sbl = split /[,]/, $sbl;
83     + }
84    
85     my %obsolete = map { $_ => 1} qw(
86     blackhole.securitysage.com
87     @@ -13,6 +33,6 @@
88     ex.dnsbl.org
89     );
90    
91     - @sbl = grep { !$obsolete{$_} } split /[,:]/, $qpsmtpd->prop('SBLList');
92     - $qpsmtpd->set_prop('SBLList', join ':', @sbl);
93     + @sbl = grep { !$obsolete{$_} } @sbl;
94     + $qpsmtpd->set_prop('SBLList', join ',', @sbl);
95     }
96     diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-2.6.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/dnsbl_zones/10RBLList mezzanine_patched_smeserver-qpsmtpd-2.6.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/dnsbl_zones/10RBLList
97     --- smeserver-qpsmtpd-2.6.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/dnsbl_zones/10RBLList 2005-10-07 03:21:58.000000000 +0200
98     +++ mezzanine_patched_smeserver-qpsmtpd-2.6.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/dnsbl_zones/10RBLList 2016-04-17 22:56:24.849213118 +0200
99     @@ -1,5 +1,5 @@
100     {
101     - my @rbllist = split /[,:]/, ${qpsmtpd}{RBLList} || '';
102     + my @rbllist = split /[,]/, ${qpsmtpd}{RBLList} || '';
103    
104     return "# No RBLs are defined" unless (scalar @rbllist);
105    
106     diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-2.6.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/rhsbl_zones/10SBLList mezzanine_patched_smeserver-qpsmtpd-2.6.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/rhsbl_zones/10SBLList
107     --- smeserver-qpsmtpd-2.6.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/rhsbl_zones/10SBLList 2006-02-05 15:38:30.000000000 +0100
108     +++ mezzanine_patched_smeserver-qpsmtpd-2.6.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/rhsbl_zones/10SBLList 2016-04-17 22:48:55.823242870 +0200
109     @@ -1,5 +1,5 @@
110     {
111     - my @rbllist = split /[,:]/, ${qpsmtpd}{SBLList} || '';
112     + my @rbllist = split /[,]/, ${qpsmtpd}{SBLList} || '';
113    
114     return "# No SBLs are defined" unless (scalar @rbllist);
115    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed