1 |
%define name smeserver-geoip |
%define name smeserver-geoip |
2 |
%define version 1.2 |
%define version 1.2 |
3 |
%define release 15 |
%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: geolite2-country |
19 |
|
Requires: geolite2-city |
20 |
|
Provides: smeserver-geoip2 >= 1.2-16 |
21 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
22 |
Patch0: smeserver-geoip-conf-typo.patch |
Patch0: smeserver-geoip-conf-typo.patch |
23 |
Patch1: smeserver-geoip-fix-city-createlinks.patch |
Patch1: smeserver-geoip-fix-city-createlinks.patch |
36 |
|
|
37 |
#---------------------------------------------------- |
#---------------------------------------------------- |
38 |
|
|
39 |
%package -n smeserver-geoip1 |
%package -n smeserver-geoip-legacy |
40 |
Summary: SME Server geoip plugin v1 |
Summary: SME Server geoip plugin v1 |
41 |
Group: Email |
Group: Email |
42 |
Requires: perl-Geo-IP |
Requires: perl-Geo-IP |
43 |
Requires: GeoIP >= 1.6.5 |
Requires: GeoIP >= 1.6.5 |
44 |
|
Requires: GeoIP-GeoLite-data |
45 |
|
Requires: GeoIP-GeoLite-data-extra |
46 |
|
Requires: smeserver-geoip >= 1.2-16 |
47 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
48 |
|
|
49 |
%description -n smeserver-geoip1 |
%description -n smeserver-geoip-legacy |
50 |
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. |
Package to use the legacy plugin. DB are not updated since 2018 |
|
|
|
|
CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR) |
|
|
SIGNAL EVENT: signal-event email-update |
|
|
#---------------------------------------------------- |
|
|
|
|
|
%package -n smeserver-geoip2 |
|
|
Summary: SME Server geoip plugin v2 |
|
|
Group: Email |
|
|
Requires: smeserver-geoip |
|
|
Requires: perl-GeoIP2 |
|
|
Requires: GeoIP >= 1.6.5 |
|
|
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 |
|
|
|
|
|
|
|
|
%description -n smeserver-geoip2 |
|
51 |
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 |
|
52 |
#---------------------------------------------------- |
#---------------------------------------------------- |
53 |
|
|
54 |
%changelog |
%changelog |
55 |
|
* Sat Mar 13 2021 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-16.sme |
56 |
|
- rebuild for SME10 [SME: 11023] |
57 |
|
make geoip2 default |
58 |
|
create geoip-legacy package with old geoip1 stuffs |
59 |
|
|
60 |
* Tue Oct 06 2020 Brian Read <brianr@bjsystems.co.uk> 1.2-15.sme |
* Tue Oct 06 2020 Brian Read <brianr@bjsystems.co.uk> 1.2-15.sme |
61 |
- Import to SME10 tree [SME: 11023] |
- Import to SME10 tree [SME: 11023] |
153 |
%patch5 -p1 |
%patch5 -p1 |
154 |
%patch6 -p1 |
%patch6 -p1 |
155 |
%patch7 -p1 |
%patch7 -p1 |
156 |
|
rm -rf root/var/ |
157 |
|
|
158 |
%build |
%build |
|
%{__mkdir_p} root/var/lib/GeoIP |
|
159 |
perl createlinks |
perl createlinks |
160 |
|
|
161 |
%install |
%install |
165 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
166 |
|
|
167 |
cat %{name}-%{version}-filelist \ |
cat %{name}-%{version}-filelist \ |
168 |
|grep -v 'etc/e-smith/templates/etc/GeoIP.conf' \ |
> %{name}-%{version}-filelist |
169 |
|grep -v 'usr/bin/geocity.pl' \ |
#|grep -v 'etc/e-smith/templates/etc/GeoIP.conf' \ |
170 |
|grep -v 'usr/bin/geocountry.pl'\ |
#|grep -v 'usr/bin/geocity.pl' \ |
171 |
|grep -v 'smeserver-geopip-download-action' \ |
#|grep -v 'usr/bin/geocountry.pl'\ |
172 |
|grep -v 'templates2expand/etc/GeoIP.conf' \ |
#|grep -v 'smeserver-geopip-download-action' \ |
173 |
|grep -v '/etc/crontab/91_Update_Geoip_db' \ |
#|grep -v 'templates2expand/etc/GeoIP.conf' \ |
174 |
|grep -v '/usr/bin/geoiplook' \ |
#|grep -v '/etc/crontab/91_Update_Geoip_db' \ |
175 |
|grep -v '/etc/e-smith/db/configuration/defaults/geoip' \ |
#|grep -v '/usr/bin/geoiplook' \ |
176 |
> %{name}-%{version}-filelist-v1 |
#|grep -v '/etc/e-smith/db/configuration/defaults/geoip' \ |
177 |
diff -u %{name}-%{version}-filelist %{name}-%{version}-filelist-v1 | grep -E "^\-"| sed -E 's/^\-//'|grep -v filelist > %{name}-%{version}-filelist-v2 |
# > %{name}-%{version}-filelist-v1 |
178 |
|
#diff -u %{name}-%{version}-filelist %{name}-%{version}-filelist-v1 | grep -E "^\-"| sed -E 's/^\-//'|grep -v filelist > %{name}-%{version}-filelist-v2 |
179 |
|
touch %{name}-%{version}-filelist-legacy |
180 |
|
|
181 |
%clean |
%clean |
182 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
190 |
|
|
191 |
|
|
192 |
|
|
193 |
%files -n smeserver-geoip2 -f %{name}-%{version}-filelist-v2 |
%files -n smeserver-geoip2 -f %{name}-%{version}-filelist |
194 |
%defattr(-,root,root,-) |
%defattr(-,root,root,-) |
195 |
|
|
196 |
%files -n smeserver-geoip1 -f %{name}-%{version}-filelist-v1 |
%files -n smeserver-geoip-legacy -f %{name}-%{version}-filelist-legacy |
197 |
%defattr(-,root,root,-) |
%defattr(-,root,root,-) |
198 |
|
|
199 |
|
|