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

Annotation of /rpms/smeserver-geoip/contribs9/smeserver-geoip-1.2-check_badcountries-mailstats.patch

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


Revision 1.1 - (hide annotations) (download)
Wed Jan 16 12:35:12 2019 UTC (5 years, 9 months ago) by jcrisp
Branch: MAIN
CVS Tags: smeserver-geoip-1_2-14_el6_sme, smeserver-geoip-1_2-7_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, smeserver-geoip-1_2-8_el6_sme, smeserver-geoip-1_2-9_el6_sme, HEAD
* Tue Jan 15 2019 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-7.sme
- Update check_badcountries to work with mailstats

1 jcrisp 1.1 diff -ruN 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-10 12:26:13.414663660 +0100
3     +++ smeserver-geoip-1.2/root/usr/share/qpsmtpd/plugins/check_badcountries 2019-01-15 00:30:12.256289214 +0100
4     @@ -96,6 +96,8 @@
5    
6     =head1 CHANGES
7    
8     +2019-01 - John Crisp - modify to work correctly with mailstats
9     +
10     2019-01 - JP Pialasse - make it compatible with old v1 + improve log level
11    
12     2018-06 - John Crisp - modify to work with SME server
13     @@ -264,11 +266,13 @@
14     # City Information in case we want to play later
15     my $city = $self->qp->connection->notes('geoip_city') // '';
16     #warn ("At City (check): $city");
17     + $self->log(LOGNOTICE, "GeoIP RemoteIP: $ip");
18     +
19     if ($city eq '') {
20     - $self->log(LOGINFO, "Information: City NA RemoteIP $ip");
21     + $self->log(LOGNOTICE, "GeoIP City: NA");
22     }
23     else {
24     - $self->log(LOGINFO, "Information: City $city RemoteIP $ip");
25     + $self->log(LOGNOTICE, "GeoIP City: $city");
26     }
27     # Should have a country and or city here
28    
29     @@ -279,15 +283,15 @@
30     # Returns DECLINED if there are no countries found above
31     return DECLINED unless $country;
32    
33     - $self->log(LOGNOTICE, "Country $country RemoteIP $ip");
34     + $self->log(LOGNOTICE, "GeoIP Country: $country");
35    
36     for (@badcountries) {
37     my ($pattern, $response) = split /\s+/, $_, 2;
38     #my $whitelisthost = $connection->notes('whitelisthost');
39     my $whitelisthost = $self->qp->connection->notes('whitelisthost');
40     if ($whitelisthost) {
41     - $self->log(LOGINFO, "Country $country Pattern $pattern Whitehost $whitelisthost RemoteIP $ip");
42     - $self->log(LOGINFO, "Geoip whitelisthost found $whitelisthost");
43     + $self->log(LOGNOTICE, "Country $country Pattern $pattern Whitehost $whitelisthost RemoteIP $ip");
44     + $self->log(LOGNOTICE, "Geoip whitelisthost found $whitelisthost");
45     return OK;
46     }
47     else {

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