/[smeserver]/rpms/smeserver-qpsmtpd/sme9/smeserver-qpsmtpd-2.4.0-change_rbl_sbl_list_separator.patch
ViewVC logotype

Annotation of /rpms/smeserver-qpsmtpd/sme9/smeserver-qpsmtpd-2.4.0-change_rbl_sbl_list_separator.patch

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


Revision 1.3 - (hide annotations) (download)
Mon Feb 27 18:58:29 2017 UTC (7 years, 3 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-qpsmtpd-2_4_0-38_el6_sme, smeserver-qpsmtpd-2_4_0-37_el6_sme, smeserver-qpsmtpd-2_4_0-35_el6_sme, smeserver-qpsmtpd-2_4_0-36_el6_sme, smeserver-qpsmtpd-2_4_0-39_el6_sme, smeserver-qpsmtpd-2_4_0-34_el6_sme, HEAD
Changes since 1.2: +1 -1 lines
* Mon Feb 27 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.4.0-34.sme
- updated regex for SBList in smeserver-qpsmtpd-2.4.0-change_rbl_sbl_list_separator.patch
- to take into account list using a subdomain [SME: 10116]
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
  by assuming the date is correct and changing the weekday.
  Thu May 11 2005 --> Thu May 05 2005 or Wed May 11 2005 or Thu May 12 2005 or ....
  Sun Sep 25 2010 --> Sun Sep 19 2010 or Sat Sep 25 2010 or Sun Sep 26 2010 or ....

1 vip-ire 1.1 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
2     --- smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/RBLList 2016-04-17 22:59:01.784202182 +0200
3     +++ mezzanine_patched_smeserver-qpsmtpd-2.4.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.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
8     --- smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/defaults/qpsmtpd/SBLList 2016-04-17 22:59:01.771202183 +0200
9     +++ mezzanine_patched_smeserver-qpsmtpd-2.4.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.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
14     --- smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/migrate/20RBLList 2016-04-17 22:59:01.785202182 +0200
15     +++ mezzanine_patched_smeserver-qpsmtpd-2.4.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 unnilennium 1.2 + my $fqdn_re = qr/([a-zA-Z0-9][a-zA-Z0-9-]{1,}[a-zA-Z0-9]\.)*[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}/;
29 vip-ire 1.1 + 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.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
56     --- smeserver-qpsmtpd-2.4.0/root/etc/e-smith/db/configuration/migrate/20SBLLIST 2016-04-17 22:59:01.780202182 +0200
57     +++ mezzanine_patched_smeserver-qpsmtpd-2.4.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 unnilennium 1.3 + my $fqdn_re = qr/([a-zA-Z0-9][a-zA-Z0-9-]{1,}[a-zA-Z0-9]\.)*[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}/;
71 vip-ire 1.1 + 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.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
97     --- 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
98     +++ 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
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.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
107     --- 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
108     +++ 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
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