1 |
%define name smeserver-geoip |
%define name smeserver-geoip |
2 |
%define version 1.2 |
%define version 1.2 |
3 |
%define release 14 |
%define release 17 |
4 |
|
|
5 |
Summary: SME Server geoip plugin |
Summary: SME Server geoip plugin |
6 |
Name: %{name} |
Name: %{name} |
12 |
Packager: Doug Kruhm <dakruhm@daknetworks.net> |
Packager: Doug Kruhm <dakruhm@daknetworks.net> |
13 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
14 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
15 |
|
Requires: perl-GeoIP2 |
16 |
|
Requires: libmaxminddb >= 1.1.1 |
17 |
|
Requires: libmaxminddb-devel >= 1.1.1 |
18 |
|
Requires: geoipupdate |
19 |
|
Requires: geolite2-country |
20 |
|
Requires: geolite2-city |
21 |
|
# for legacy |
22 |
|
Requires: perl-Geo-IP |
23 |
Requires: GeoIP >= 1.6.5 |
Requires: GeoIP >= 1.6.5 |
24 |
|
# |
25 |
|
Provides: smeserver-geoip2 = %{version}-%{release} |
26 |
|
PRovides: smeserver-geoip-legacy = %{version}-%{release} |
27 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
28 |
Patch0: smeserver-geoip-conf-typo.patch |
Patch0: smeserver-geoip-conf-typo.patch |
29 |
Patch1: smeserver-geoip-fix-city-createlinks.patch |
Patch1: smeserver-geoip-fix-city-createlinks.patch |
33 |
Patch5: smeserver-geoip-1.2-bz10815-display-country.patch |
Patch5: smeserver-geoip-1.2-bz10815-display-country.patch |
34 |
Patch6: smeserver-geoip-1.2-bz10859-bz10740.patch |
Patch6: smeserver-geoip-1.2-bz10859-bz10740.patch |
35 |
Patch7: smeserver-geoip-1.2-fix-product-id.patch |
Patch7: smeserver-geoip-1.2-fix-product-id.patch |
36 |
|
Patch8: smeserver-geoip-1.2-sme10-update.patch |
37 |
|
|
38 |
%description |
%description |
39 |
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. |
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 |
SIGNAL EVENT: signal-event email-update |
SIGNAL EVENT: signal-event email-update |
43 |
|
|
44 |
#---------------------------------------------------- |
#---------------------------------------------------- |
45 |
|
#%package -n smeserver-geoip-legacy |
46 |
%package -n smeserver-geoip1 |
#Summary: SME Server geoip plugin v1 |
47 |
Summary: SME Server geoip plugin v1 |
#Group: Email |
48 |
Group: Email |
#Requires: perl-Geo-IP |
49 |
Requires: perl-Geo-IP |
#Requires: GeoIP >= 1.6.5 |
50 |
Requires: GeoIP >= 1.6.5 |
#Requires: smeserver-geoip = %{version}-%{release} |
51 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
#BuildRequires: e-smith-devtools >= 1.13.1-03 |
52 |
|
#%description -n smeserver-geoip-legacy |
53 |
%description -n smeserver-geoip1 |
#Package to use the legacy plugin. DB are not updated since 2018 |
54 |
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. |
#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. |
|
|
|
|
CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR) |
|
|
SIGNAL EVENT: signal-event email-update |
|
55 |
#---------------------------------------------------- |
#---------------------------------------------------- |
56 |
|
|
57 |
%package -n smeserver-geoip2 |
%changelog |
58 |
Summary: SME Server geoip plugin v2 |
* Sun Mar 14 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.2-17.sme |
59 |
Group: Email |
- merge legacy with main as we have few packages still using legacy [SME: 11023] |
60 |
Requires: smeserver-geoip |
those are php*-pecl-geoip proftpd bind-libs* bind-utils. |
61 |
Requires: perl-GeoIP2 |
|
62 |
Requires: GeoIP >= 1.6.5 |
* Sat Mar 13 2021 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-16.sme |
63 |
Requires: libmaxminddb >= 1.1.1 |
- rebuild for SME10 [SME: 11023] |
64 |
Requires: libmaxminddb-devel >= 1.1.1 |
make geoip2 default |
65 |
Requires: geolite2-country |
create geoip-legacy package with old geoip1 stuffs |
66 |
Requires: geolite2-city |
smeserver-geoip(-legacy)-update events |
|
BuildRequires: e-smith-devtools >= 1.13.1-03 |
|
|
|
|
|
|
|
|
%description -n smeserver-geoip2 |
|
|
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. |
|
67 |
|
|
68 |
CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR) |
* Tue Oct 06 2020 Brian Read <brianr@bjsystems.co.uk> 1.2-15.sme |
69 |
SIGNAL EVENT: signal-event email-update |
- Import to SME10 tree [SME: 11023] |
|
#---------------------------------------------------- |
|
70 |
|
|
|
%changelog |
|
71 |
* Wed Jan 22 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-14.sme |
* Wed Jan 22 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-14.sme |
72 |
- Change template from EditionID to ProductID |
- Change template from EditionID to ProductID |
73 |
- fix 20databasestore has a trailing tilde |
- fix 20databasestore has a trailing tilde |
161 |
%patch5 -p1 |
%patch5 -p1 |
162 |
%patch6 -p1 |
%patch6 -p1 |
163 |
%patch7 -p1 |
%patch7 -p1 |
164 |
|
rm -rf root/var/ |
165 |
|
%patch8 -p1 |
166 |
|
# commented for legacy |
167 |
|
#mkdir -p root/etc/e-smith/events/smeserver-geoip-legacy |
168 |
|
|
169 |
%build |
%build |
|
%{__mkdir_p} root/var/lib/GeoIP |
|
170 |
perl createlinks |
perl createlinks |
171 |
|
|
172 |
%install |
%install |
173 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
174 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
175 |
rm -f %{name}-%{version}-filelist |
rm -f %{name}-%{version}-filelist |
176 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
177 |
|
--file /usr/bin/geoiplook 'attr(0755,root,root)' \ |
178 |
|
> %{name}-%{version}-filelist |
179 |
|
|
180 |
cat %{name}-%{version}-filelist \ |
cat %{name}-%{version}-filelist \ |
181 |
|grep -v 'etc/e-smith/templates/etc/GeoIP.conf' \ |
|grep -v 'etc/e-smith/events/smeserver-geoip-legacy' \ |
182 |
|grep -v 'usr/bin/geocity.pl' \ |
> %{name}-%{version}-filelist-base |
183 |
|grep -v 'usr/bin/geocountry.pl'\ |
#cat %{name}-%{version}-filelist \ |
184 |
|grep -v 'smeserver-geopip-download-action' \ |
#|grep 'etc/e-smith/events/smeserver-geoip-legacy' \ |
185 |
|grep -v 'templates2expand/etc/GeoIP.conf' \ |
#> %{name}-%{version}-filelist-legacy |
186 |
|grep -v '/etc/crontab/91_Update_Geoip_db' \ |
|
|
|grep -v '/usr/bin/geoiplook' \ |
|
|
|grep -v '/etc/e-smith/db/configuration/defaults/geoip' \ |
|
|
> %{name}-%{version}-filelist-v1 |
|
|
diff -u %{name}-%{version}-filelist %{name}-%{version}-filelist-v1 | grep -E "^\-"| sed -E 's/^\-//'|grep -v filelist > %{name}-%{version}-filelist-v2 |
|
187 |
|
|
188 |
%clean |
%clean |
189 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
192 |
|
|
193 |
%postun |
%postun |
194 |
|
|
195 |
%files -f %{name}-%{version}-filelist-v1 |
%files -f %{name}-%{version}-filelist-base |
196 |
%defattr(-,root,root) |
%defattr(-,root,root) |
197 |
|
|
198 |
|
|
199 |
|
|
200 |
%files -n smeserver-geoip2 -f %{name}-%{version}-filelist-v2 |
#%files -n smeserver-geoip-legacy -f %{name}-%{version}-filelist-legacy |
201 |
%defattr(-,root,root,-) |
#%defattr(-,root,root,-) |
|
|
|
|
%files -n smeserver-geoip1 -f %{name}-%{version}-filelist-v1 |
|
|
%defattr(-,root,root,-) |
|
202 |
|
|
203 |
|
|
204 |
|
|