1 |
%define name smeserver-geoip |
%define name smeserver-geoip |
2 |
%define version 1.2 |
%define version 1.2 |
3 |
%define release 14 |
%define release 16 |
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: GeoIP >= 1.6.5 |
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 |
|
Provides: smeserver-geoip2 >= 1.2-16 |
22 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
23 |
Patch0: smeserver-geoip-conf-typo.patch |
Patch0: smeserver-geoip-conf-typo.patch |
24 |
Patch1: smeserver-geoip-fix-city-createlinks.patch |
Patch1: smeserver-geoip-fix-city-createlinks.patch |
28 |
Patch5: smeserver-geoip-1.2-bz10815-display-country.patch |
Patch5: smeserver-geoip-1.2-bz10815-display-country.patch |
29 |
Patch6: smeserver-geoip-1.2-bz10859-bz10740.patch |
Patch6: smeserver-geoip-1.2-bz10859-bz10740.patch |
30 |
Patch7: smeserver-geoip-1.2-fix-product-id.patch |
Patch7: smeserver-geoip-1.2-fix-product-id.patch |
31 |
|
Patch8: smeserver-geoip-1.2-sme10-update.patch |
32 |
|
|
33 |
%description |
%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. |
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. |
38 |
|
|
39 |
#---------------------------------------------------- |
#---------------------------------------------------- |
40 |
|
|
41 |
%package -n smeserver-geoip1 |
%package -n smeserver-geoip-legacy |
42 |
Summary: SME Server geoip plugin v1 |
Summary: SME Server geoip plugin v1 |
43 |
Group: Email |
Group: Email |
44 |
Requires: perl-Geo-IP |
Requires: perl-Geo-IP |
45 |
Requires: GeoIP >= 1.6.5 |
Requires: GeoIP >= 1.6.5 |
46 |
|
Requires: GeoIP-GeoLite-data |
47 |
|
Requires: GeoIP-GeoLite-data-extra |
48 |
|
Requires: smeserver-geoip >= 1.2-16 |
49 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
50 |
|
|
51 |
%description -n smeserver-geoip1 |
%description -n smeserver-geoip-legacy |
52 |
|
Package to use the legacy plugin. DB are not updated since 2018 |
53 |
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 |
|
54 |
#---------------------------------------------------- |
#---------------------------------------------------- |
55 |
|
|
56 |
%package -n smeserver-geoip2 |
%changelog |
57 |
Summary: SME Server geoip plugin v2 |
* Sat Mar 13 2021 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-16.sme |
58 |
Group: Email |
- rebuild for SME10 [SME: 11023] |
59 |
Requires: smeserver-geoip |
make geoip2 default |
60 |
Requires: perl-GeoIP2 |
create geoip-legacy package with old geoip1 stuffs |
61 |
Requires: GeoIP >= 1.6.5 |
smeserver-geoip(-legacy)-update events |
|
Requires: libmaxminddb >= 1.1.1 |
|
|
Requires: libmaxminddb-devel >= 1.1.1 |
|
|
Requires: geolite2-country |
|
|
Requires: geolite2-city |
|
|
BuildRequires: e-smith-devtools >= 1.13.1-03 |
|
|
|
|
62 |
|
|
63 |
%description -n smeserver-geoip2 |
* Tue Oct 06 2020 Brian Read <brianr@bjsystems.co.uk> 1.2-15.sme |
64 |
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. |
- Import to SME10 tree [SME: 11023] |
65 |
|
|
|
CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR) |
|
|
SIGNAL EVENT: signal-event email-update |
|
|
#---------------------------------------------------- |
|
|
|
|
|
%changelog |
|
66 |
* 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 |
67 |
- Change template from EditionID to ProductID |
- Change template from EditionID to ProductID |
68 |
- fix 20databasestore has a trailing tilde |
- fix 20databasestore has a trailing tilde |
156 |
%patch5 -p1 |
%patch5 -p1 |
157 |
%patch6 -p1 |
%patch6 -p1 |
158 |
%patch7 -p1 |
%patch7 -p1 |
159 |
|
rm -rf root/var/ |
160 |
|
%patch8 -p1 |
161 |
|
mkdir -p root/etc/e-smith/events/smeserver-geoip-legacy |
162 |
|
|
163 |
%build |
%build |
|
%{__mkdir_p} root/var/lib/GeoIP |
|
164 |
perl createlinks |
perl createlinks |
165 |
|
|
166 |
%install |
%install |
170 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
171 |
|
|
172 |
cat %{name}-%{version}-filelist \ |
cat %{name}-%{version}-filelist \ |
173 |
|grep -v 'etc/e-smith/templates/etc/GeoIP.conf' \ |
|grep -v 'etc/e-smith/events/smeserver-geoip-legacy' \ |
174 |
|grep -v 'usr/bin/geocity.pl' \ |
> %{name}-%{version}-filelist-base |
175 |
|grep -v 'usr/bin/geocountry.pl'\ |
cat %{name}-%{version}-filelist \ |
176 |
|grep -v 'smeserver-geopip-download-action' \ |
|grep 'etc/e-smith/events/smeserver-geoip-legacy' \ |
177 |
|grep -v 'templates2expand/etc/GeoIP.conf' \ |
> %{name}-%{version}-filelist-legacy |
178 |
|grep -v '/etc/crontab/91_Update_Geoip_db' \ |
|
179 |
|grep -v '/usr/bin/geoiplook' \ |
#diff -u %{name}-%{version}-filelist %{name}-%{version}-filelist-v1 | grep -E "^\-"| sed -E 's/^\-//'|grep -v filelist > %{name}-%{version}-filelist-v2 |
|
|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 |
|
180 |
|
|
181 |
%clean |
%clean |
182 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
185 |
|
|
186 |
%postun |
%postun |
187 |
|
|
188 |
%files -f %{name}-%{version}-filelist-v1 |
%files -f %{name}-%{version}-filelist-base |
189 |
%defattr(-,root,root) |
%defattr(-,root,root) |
190 |
|
|
191 |
|
|
192 |
|
|
193 |
%files -n smeserver-geoip2 -f %{name}-%{version}-filelist-v2 |
%files -n smeserver-geoip-legacy -f %{name}-%{version}-filelist-legacy |
|
%defattr(-,root,root,-) |
|
|
|
|
|
%files -n smeserver-geoip1 -f %{name}-%{version}-filelist-v1 |
|
194 |
%defattr(-,root,root,-) |
%defattr(-,root,root,-) |
195 |
|
|
196 |
|
|