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

Diff 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 | View Patch Patch

Revision 1.1 by vip-ire, Sun Apr 17 21:15:41 2016 UTC Revision 1.2 by unnilennium, Mon Feb 27 18:55:12 2017 UTC
# Line 25  diff -Nur -x '*.orig' -x '*.rej' smeserv Line 25  diff -Nur -x '*.orig' -x '*.rej' smeserv
25  +    # Migrate to use , as separator instead of :  +    # Migrate to use , as separator instead of :
26  +    if ($rbl !~ m/,/){  +    if ($rbl !~ m/,/){
27  +        my @zones = split /[:]/, $rbl;  +        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,}/;  +        my $fqdn_re = qr/([a-zA-Z0-9][a-zA-Z0-9\-]{1,61}\.)*[a-zA-Z0-9][a-zA-Z0-9\-]{1,61}\.[a-zA-Z]{2,}/;
29  +        if (scalar @zones == 2 && $zones[1] !~ m/^$fqdn_re$/){  +        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  +            # 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  +            # so if you only have something like dnsbl.foo.net:Sorry you are blacklisted
# Line 67  diff -Nur -x '*.orig' -x '*.rej' smeserv Line 67  diff -Nur -x '*.orig' -x '*.rej' smeserv
67  +    # Migrate to use , as separator instead of :  +    # Migrate to use , as separator instead of :
68  +    if ($sbl !~ m/,/){  +    if ($sbl !~ m/,/){
69  +        my @zones = split /[:]/, $sbl;  +        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,}/;  +        my $fqdn_re = qr/([a-zA-Z0-9][a-zA-Z0-9\-]{1,61}\.)*[a-zA-Z0-9][a-zA-Z0-9\-]{1,61}\.[a-zA-Z]{2,}/;
71  +        if (scalar @zones == 2 && $zones[1] !~ m/^$fqdn_re$/){  +        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  +            # 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  +            # so if you only have something like rhsbl.foo.net:Sorry you are blacklisted


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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