/[smecontribs]/rpms/smeserver-geoip/contribs10/smeserver-geoip-1.2-check_badcountries.patch
ViewVC logotype

Annotation of /rpms/smeserver-geoip/contribs10/smeserver-geoip-1.2-check_badcountries.patch

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


Revision 1.1 - (hide annotations) (download)
Tue Oct 6 13:45:12 2020 UTC (4 years ago) by brianr
Branch: MAIN
CVS Tags: smeserver-geoip-1_2-15_el7_sme, smeserver-geoip-1_2-18_el7_sme, smeserver-geoip-1_2-16_el7_sme, smeserver-geoip-1_2-17_el7_sme, HEAD
Initial import

1 brianr 1.1 diff -Nur smeserver-geoip-1.2.old/root/usr/share/qpsmtpd/plugins/check_badcountries smeserver-geoip-1.2/root/usr/share/qpsmtpd/plugins/check_badcountries
2     --- smeserver-geoip-1.2.old/root/usr/share/qpsmtpd/plugins/check_badcountries 2019-01-05 14:42:43.487000000 -0500
3     +++ smeserver-geoip-1.2/root/usr/share/qpsmtpd/plugins/check_badcountries 2019-01-05 14:47:37.767000000 -0500
4     @@ -96,6 +96,8 @@
5    
6     =head1 CHANGES
7    
8     +2019-01 - JP Pialasse - make it compatible with old v1 + improve log level
9     +
10     2018-06 - John Crisp - modify to work with SME server
11    
12     2014-06 - Matt Simerson - added GeoIP2 support
13     @@ -152,9 +154,8 @@
14    
15     sub load_geoip {
16     my ( $self ) = @_;
17     - # prevent v1 from functioning
18     - # $self->load_geoip1() and return 1;
19     $self->load_geoip2() and return 1;
20     + $self->load_geoip1() and return 1; #only search v1 if v2 not available
21     return 0;
22     }
23    
24     @@ -278,7 +279,7 @@
25     # Returns DECLINED if there are no countries found above
26     return DECLINED unless $country;
27    
28     - $self->log(LOGINFO, "Country $country RemoteIP $ip");
29     + $self->log(LOGNOTICE, "Country $country RemoteIP $ip");
30    
31     for (@badcountries) {
32     my ($pattern, $response) = split /\s+/, $_, 2;
33     @@ -476,6 +477,7 @@
34     return $self->set_asn_ipv6($ip);
35     }
36     return if ! $self->{GeoIPASNum};
37     + return if ! $self->{GeoIPASNum}->can('name_by_addr');# prior Geo-IP 1.39 should use org_by_addr
38    
39     my $asn = $self->{GeoIPASNum}->name_by_addr($ip) or return;
40     if ('AS' eq substr($asn, 0, 2)) {

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