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