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