1 |
brianr |
1.1 |
%define name smeserver-geoip |
2 |
|
|
%define version 1.2 |
3 |
jpp |
1.3 |
%define release 16 |
4 |
brianr |
1.1 |
|
5 |
|
|
Summary: SME Server geoip plugin |
6 |
|
|
Name: %{name} |
7 |
|
|
Version: %{version} |
8 |
|
|
Release: %{release}%{?dist} |
9 |
|
|
License: GPL |
10 |
|
|
Group: Email |
11 |
|
|
Source: %{name}-%{version}.tar.gz |
12 |
|
|
Packager: Doug Kruhm <dakruhm@daknetworks.net> |
13 |
|
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
14 |
|
|
BuildArchitectures: noarch |
15 |
jpp |
1.3 |
Requires: perl-GeoIP2 |
16 |
|
|
Requires: libmaxminddb >= 1.1.1 |
17 |
|
|
Requires: libmaxminddb-devel >= 1.1.1 |
18 |
jpp |
1.5 |
Requires: geoipupdate |
19 |
jpp |
1.3 |
Requires: geolite2-country |
20 |
|
|
Requires: geolite2-city |
21 |
|
|
Provides: smeserver-geoip2 >= 1.2-16 |
22 |
brianr |
1.1 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
23 |
|
|
Patch0: smeserver-geoip-conf-typo.patch |
24 |
|
|
Patch1: smeserver-geoip-fix-city-createlinks.patch |
25 |
|
|
Patch2: smeserver-geoip-1.2-check_badcountries.patch |
26 |
|
|
Patch3: smeserver-geoip-1.2-check_badcountries-mailstats.patch |
27 |
|
|
Patch4: smeserver-geoip-1.2-bz10820-geoipv1-blockvountries-qpsmtpd.patch |
28 |
|
|
Patch5: smeserver-geoip-1.2-bz10815-display-country.patch |
29 |
|
|
Patch6: smeserver-geoip-1.2-bz10859-bz10740.patch |
30 |
|
|
Patch7: smeserver-geoip-1.2-fix-product-id.patch |
31 |
jpp |
1.5 |
Patch8: smeserver-geoip-1.2-sme10-update.patch |
32 |
brianr |
1.1 |
|
33 |
|
|
%description |
34 |
|
|
The GEOIP plugin lets us know which country our mail server is receiving mail from. If we're receiving too much spam from a particular country, this will help track it down and then use that info to reject connections from that country. This ends up taking the load off our servers. |
35 |
|
|
|
36 |
|
|
CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR) |
37 |
|
|
SIGNAL EVENT: signal-event email-update |
38 |
|
|
|
39 |
|
|
#---------------------------------------------------- |
40 |
|
|
|
41 |
jpp |
1.3 |
%package -n smeserver-geoip-legacy |
42 |
brianr |
1.1 |
Summary: SME Server geoip plugin v1 |
43 |
|
|
Group: Email |
44 |
|
|
Requires: perl-Geo-IP |
45 |
|
|
Requires: GeoIP >= 1.6.5 |
46 |
jpp |
1.3 |
Requires: GeoIP-GeoLite-data |
47 |
|
|
Requires: GeoIP-GeoLite-data-extra |
48 |
|
|
Requires: smeserver-geoip >= 1.2-16 |
49 |
brianr |
1.1 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
50 |
|
|
|
51 |
jpp |
1.3 |
%description -n smeserver-geoip-legacy |
52 |
|
|
Package to use the legacy plugin. DB are not updated since 2018 |
53 |
brianr |
1.1 |
The GEOIP plugin lets us know which country our mail server is receiving mail from. If we're receiving too much spam from a particular country, this will help track it down and then use that info to reject connections from that country. This ends up taking the load off our servers. |
54 |
|
|
#---------------------------------------------------- |
55 |
|
|
|
56 |
|
|
%changelog |
57 |
jpp |
1.3 |
* Sat Mar 13 2021 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-16.sme |
58 |
|
|
- rebuild for SME10 [SME: 11023] |
59 |
|
|
make geoip2 default |
60 |
|
|
create geoip-legacy package with old geoip1 stuffs |
61 |
jpp |
1.5 |
smeserver-geoip(-legacy)-update events |
62 |
brianr |
1.2 |
|
63 |
|
|
* Tue Oct 06 2020 Brian Read <brianr@bjsystems.co.uk> 1.2-15.sme |
64 |
|
|
- Import to SME10 tree [SME: 11023] |
65 |
|
|
|
66 |
brianr |
1.1 |
* Wed Jan 22 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-14.sme |
67 |
|
|
- Change template from EditionID to ProductID |
68 |
|
|
- fix 20databasestore has a trailing tilde |
69 |
|
|
|
70 |
|
|
* Tue Jan 21 2020 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-13.sme |
71 |
|
|
- add support for mmdblookup [SME: 10740] |
72 |
|
|
- add support for download with AccountID and LicenseKey [SME: 10859] |
73 |
|
|
|
74 |
|
|
* Sun Oct 20 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-10.sme |
75 |
|
|
- fix country not logged if no badcountries defined [SME: 10815] |
76 |
|
|
|
77 |
|
|
* Fri Oct 18 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-9.sme |
78 |
|
|
- revert blocking country for geoipv1 qpsmtpd plugin [SME: 10820] |
79 |
|
|
|
80 |
|
|
* Thu Jan 24 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-8.sme |
81 |
|
|
- make smeserver-geoip2 requires smeserver-geoip [SME: 10691] |
82 |
|
|
this will avoid having both packages sharing few files. |
83 |
|
|
|
84 |
|
|
* Tue Jan 15 2019 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-7.sme |
85 |
|
|
- Update check_badcountries to work with mailstats |
86 |
|
|
|
87 |
|
|
* Sat Jan 05 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-6.sme |
88 |
|
|
- remove crontab fragment for v1 [SME: 10691] |
89 |
|
|
|
90 |
|
|
* Sat Jan 05 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-5.sme |
91 |
|
|
- fix wrong loglevel LOGINFO instead of LOGNOTICE needed [SME: 10679] |
92 |
|
|
- try first db v2 and back on v1 if not available [SME: 10691] |
93 |
|
|
- workaround FATAL PLUGIN ERROR when method name_by_addr not existing priori geo-ip 1.39 [SME: 10691] |
94 |
|
|
|
95 |
|
|
* Fri Jan 04 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-4.sme |
96 |
|
|
- split smeserver-geoip into smeserver-geoip and smeserver-geoip2 for compatibility [SME: 10691] |
97 |
|
|
- TODO: workaround to find for plugin compatibility |
98 |
|
|
|
99 |
|
|
* Mon Oct 29 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-3.sme |
100 |
|
|
- Fix Use of uninitialized value $city in string eq |
101 |
|
|
- Fix createlinks geoip-update action |
102 |
|
|
|
103 |
|
|
* Sat Jun 23 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-2.sme |
104 |
|
|
- Fix typo in createlinks |
105 |
|
|
|
106 |
|
|
* Tue Jun 12 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-1.sme |
107 |
|
|
- Update to latest v2 DBs [SME: 9033] |
108 |
|
|
- add geocity.pl and geocountry.pl test files |
109 |
|
|
|
110 |
|
|
* Wed Feb 15 2017 Jean-Philipe Pialasse <tests@pialasse.com> 1.1.2-7.sme |
111 |
|
|
- update requirement for GeoIP 1.6.5 [SME: 9714] |
112 |
|
|
|
113 |
|
|
* Thu Dec 22 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 1.1.2-6 |
114 |
|
|
- Use newer versions of GeoIP databases [SME: 9714] |
115 |
|
|
|
116 |
|
|
* Wed Sep 23 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 1.1.2-5 |
117 |
|
|
- Add ability to whitelist an IP [SME:8981] |
118 |
|
|
|
119 |
|
|
* Tue Sep 22 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.1.2-4 |
120 |
|
|
- the event geoip-update download the geoip database |
121 |
|
|
- added smeserver-geoip-1.1.2.geoip-update-event.patch |
122 |
|
|
|
123 |
|
|
* Sun Jun 14 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.1.2-2 |
124 |
|
|
- added createlinks |
125 |
|
|
- added actions and crontab to download geoip database |
126 |
|
|
|
127 |
|
|
* Mon Sep 03 2012 Doug Kruhm <dakruhm@daknetworks.net> 1.0.5 |
128 |
|
|
- defining $country to reduce noise if not found [SME: 5011] |
129 |
|
|
- fixed misspelling in response if country is blocked [SME: 7058] |
130 |
|
|
- cleaning up versioning to MAJOR-MINOR-PATCH |
131 |
|
|
|
132 |
|
|
* Fri May 01 2009 Doug Kruhm <dakruhm@daknetworks.net> 1.0.0-04 |
133 |
|
|
- added response to connecting server if blocked [SME: 5011] |
134 |
|
|
|
135 |
|
|
* Fri May 01 2009 Doug Kruhm <dakruhm@daknetworks.net> 1.0.0-03 |
136 |
|
|
- added line to reduce log noise [SME: 5011] |
137 |
|
|
|
138 |
|
|
* Fri May 01 2009 Doug Kruhm <dakruhm@daknetworks.net> 1.0.0-02 |
139 |
|
|
- db defaults migrated from SPEC file to rpm files [SME: 5193] |
140 |
|
|
- removed %post and %postun macros [SME: 5194] |
141 |
|
|
- added Requires perl-Geo-IP [SME: 1866] |
142 |
|
|
- added e-smith-devtools as a requirement [SME: 1866] |
143 |
|
|
|
144 |
|
|
* Thu Jun 16 2007 Doug Kruhm <dakruhm@daknetworks.net> |
145 |
|
|
- 1.0.0-01 |
146 |
|
|
- Original version |
147 |
|
|
|
148 |
|
|
|
149 |
|
|
%prep |
150 |
|
|
%setup |
151 |
|
|
%patch0 -p1 |
152 |
|
|
%patch1 -p1 |
153 |
|
|
%patch2 -p1 |
154 |
|
|
%patch3 -p1 |
155 |
|
|
%patch4 -p1 |
156 |
|
|
%patch5 -p1 |
157 |
|
|
%patch6 -p1 |
158 |
|
|
%patch7 -p1 |
159 |
jpp |
1.3 |
rm -rf root/var/ |
160 |
jpp |
1.5 |
%patch8 -p1 |
161 |
|
|
mkdir -p root/etc/e-smith/events/smeserver-geoip-legacy |
162 |
brianr |
1.1 |
|
163 |
|
|
%build |
164 |
|
|
perl createlinks |
165 |
|
|
|
166 |
|
|
%install |
167 |
|
|
rm -rf $RPM_BUILD_ROOT |
168 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
169 |
|
|
rm -f %{name}-%{version}-filelist |
170 |
jpp |
1.6 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
171 |
|
|
--file /usr/bin/geoiplook 'attr(0755,root,root)' \ |
172 |
|
|
> %{name}-%{version}-filelist |
173 |
brianr |
1.1 |
|
174 |
|
|
cat %{name}-%{version}-filelist \ |
175 |
jpp |
1.5 |
|grep -v 'etc/e-smith/events/smeserver-geoip-legacy' \ |
176 |
|
|
> %{name}-%{version}-filelist-base |
177 |
|
|
cat %{name}-%{version}-filelist \ |
178 |
|
|
|grep 'etc/e-smith/events/smeserver-geoip-legacy' \ |
179 |
|
|
> %{name}-%{version}-filelist-legacy |
180 |
|
|
|
181 |
jpp |
1.3 |
#diff -u %{name}-%{version}-filelist %{name}-%{version}-filelist-v1 | grep -E "^\-"| sed -E 's/^\-//'|grep -v filelist > %{name}-%{version}-filelist-v2 |
182 |
brianr |
1.1 |
|
183 |
|
|
%clean |
184 |
|
|
rm -rf $RPM_BUILD_ROOT |
185 |
|
|
|
186 |
|
|
%post |
187 |
|
|
|
188 |
|
|
%postun |
189 |
|
|
|
190 |
jpp |
1.5 |
%files -f %{name}-%{version}-filelist-base |
191 |
brianr |
1.1 |
%defattr(-,root,root) |
192 |
|
|
|
193 |
|
|
|
194 |
|
|
|
195 |
jpp |
1.3 |
%files -n smeserver-geoip-legacy -f %{name}-%{version}-filelist-legacy |
196 |
brianr |
1.1 |
%defattr(-,root,root,-) |
197 |
|
|
|
198 |
|
|
|
199 |
|
|
|