/[smecontribs]/rpms/smeserver-geoip/contribs9/smeserver-geoip-1.2-bz10815-display-country.patch
ViewVC logotype

Annotation of /rpms/smeserver-geoip/contribs9/smeserver-geoip-1.2-bz10815-display-country.patch

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


Revision 1.1 - (hide annotations) (download)
Mon Oct 21 01:48:39 2019 UTC (4 years, 6 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-geoip-1_2-14_el6_sme, smeserver-geoip-1_2-11_el6_sme, smeserver-geoip-1_2-10_el6_sme, smeserver-geoip-1_2-13_el6_sme, smeserver-geoip-1_2-12_el6_sme, HEAD
* Sun Oct 20 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-10.sme
- fix country not logged if no badcountries defined [SME: 10815]

1 jpp 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-10-20 21:40:40.825000000 -0400
3     +++ smeserver-geoip-1.2/root/usr/share/qpsmtpd/plugins/check_badcountries 2019-10-20 21:43:24.353000000 -0400
4     @@ -276,17 +276,14 @@
5     else {
6     $self->log(LOGNOTICE, "GeoIP City: $city");
7     }
8     - # Should have a country and or city here
9     +
10     + my $country = $self->qp->connection->notes('geoip_country');
11     + # Returns DECLINED if there are no countries found above
12     + return DECLINED unless $country;
13     + $self->log(LOGNOTICE, "GeoIP Country: $country");
14    
15     if ( $self->qp->config("badcountries") ) {
16     my @badcountries = $self->qp->config("badcountries");
17     -
18     - my $country = $self->qp->connection->notes('geoip_country');
19     - # Returns DECLINED if there are no countries found above
20     - return DECLINED unless $country;
21     -
22     - $self->log(LOGNOTICE, "GeoIP Country: $country");
23     -
24     for (@badcountries) {
25     my ($pattern, $response) = split /\s+/, $_, 2;
26     #my $whitelisthost = $connection->notes('whitelisthost');
27     @@ -346,15 +343,13 @@
28     }
29     $self->log(LOGINFO, join(", ", @msg_parts));
30    
31     + my $country = $self->qp->connection->notes('geoip_country');
32     + # Returns DECLINED if there are no countries found above
33     + return DECLINED unless $country;
34     + $self->log(LOGNOTICE, "GeoIP Country: $country");
35     +
36     if ( $self->qp->config("badcountries") ) {
37     my @badcountries = $self->qp->config("badcountries");
38     -
39     - my $country = $self->qp->connection->notes('geoip_country');
40     - # Returns DECLINED if there are no countries found above
41     - return DECLINED unless $country;
42     -
43     - $self->log(LOGNOTICE, "GeoIP Country: $country");
44     -
45     for (@badcountries) {
46     my ($pattern, $response) = split /\s+/, $_, 2;
47     #my $whitelisthost = $connection->notes('whitelisthost');

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