1 |
%define name smeserver-geoip |
%define name smeserver-geoip |
2 |
%define version 1.1.2 |
%define version 1.2 |
3 |
%define release 1 |
%define release 8 |
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-Geo-IP |
Requires: GeoIP >= 1.6.5 |
16 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
17 |
Patch0 : smeserver-geoip-remove-createlink-add-geoip-download-actions.patch |
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 |
|
|
22 |
%description |
%description |
23 |
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. |
24 |
|
|
25 |
CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR) |
CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR) |
26 |
SIGNAL EVENT: signal-event email-update |
SIGNAL EVENT: signal-event email-update |
27 |
|
|
28 |
|
#---------------------------------------------------- |
29 |
|
|
30 |
|
%package -n smeserver-geoip1 |
31 |
|
Summary: SME Server geoip plugin v1 |
32 |
|
Group: Email |
33 |
|
Requires: perl-Geo-IP |
34 |
|
Requires: GeoIP >= 1.6.5 |
35 |
|
BuildRequires: e-smith-devtools >= 1.13.1-03 |
36 |
|
|
37 |
|
%description -n smeserver-geoip1 |
38 |
|
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. |
39 |
|
|
40 |
|
CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR) |
41 |
|
SIGNAL EVENT: signal-event email-update |
42 |
|
#---------------------------------------------------- |
43 |
|
|
44 |
|
%package -n smeserver-geoip2 |
45 |
|
Summary: SME Server geoip plugin v2 |
46 |
|
Group: Email |
47 |
|
Requires: smeserver-geoip |
48 |
|
Requires: perl-GeoIP2 |
49 |
|
Requires: GeoIP >= 1.6.5 |
50 |
|
BuildRequires: e-smith-devtools >= 1.13.1-03 |
51 |
|
|
52 |
|
|
53 |
|
%description -n smeserver-geoip2 |
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. |
55 |
|
|
56 |
|
CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR) |
57 |
|
SIGNAL EVENT: signal-event email-update |
58 |
|
#---------------------------------------------------- |
59 |
|
|
60 |
%changelog |
%changelog |
61 |
* Sun Jun 14 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.1.2-1 |
* Thu Jan 24 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-8.sme |
62 |
|
- make smeserver-geoip2 requires smeserver-geoip [SME: 10691] |
63 |
|
this will avoid having both packages sharing few files. |
64 |
|
|
65 |
|
* Tue Jan 15 2019 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-7.sme |
66 |
|
- Update check_badcountries to work with mailstats |
67 |
|
|
68 |
|
* Sat Jan 05 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-6.sme |
69 |
|
- remove crontab fragment for v1 [SME: 10691] |
70 |
|
|
71 |
|
* Sat Jan 05 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-5.sme |
72 |
|
- fix wrong loglevel LOGINFO instead of LOGNOTICE needed [SME: 10679] |
73 |
|
- try first db v2 and back on v1 if not available [SME: 10691] |
74 |
|
- workaround FATAL PLUGIN ERROR when method name_by_addr not existing priori geo-ip 1.39 [SME: 10691] |
75 |
|
|
76 |
|
* Fri Jan 04 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-4.sme |
77 |
|
- split smeserver-geoip into smeserver-geoip and smeserver-geoip2 for compatibility [SME: 10691] |
78 |
|
- TODO: workaround to find for plugin compatibility |
79 |
|
|
80 |
|
* Mon Oct 29 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-3.sme |
81 |
|
- Fix Use of uninitialized value $city in string eq |
82 |
|
- Fix createlinks geoip-update action |
83 |
|
|
84 |
|
* Sat Jun 23 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-2.sme |
85 |
|
- Fix typo in createlinks |
86 |
|
|
87 |
|
* Tue Jun 12 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-1.sme |
88 |
|
- Update to latest v2 DBs [SME: 9033] |
89 |
|
- add geocity.pl and geocountry.pl test files |
90 |
|
|
91 |
|
* Wed Feb 15 2017 Jean-Philipe Pialasse <tests@pialasse.com> 1.1.2-7.sme |
92 |
|
- update requirement for GeoIP 1.6.5 [SME: 9714] |
93 |
|
|
94 |
|
* Thu Dec 22 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 1.1.2-6 |
95 |
|
- Use newer versions of GeoIP databases [SME: 9714] |
96 |
|
|
97 |
|
* Wed Sep 23 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 1.1.2-5 |
98 |
|
- Add ability to whitelist an IP [SME:8981] |
99 |
|
|
100 |
|
* Tue Sep 22 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.1.2-4 |
101 |
|
- the event geoip-update download the geoip database |
102 |
|
- added smeserver-geoip-1.1.2.geoip-update-event.patch |
103 |
|
|
104 |
|
* Sun Jun 14 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.1.2-2 |
105 |
- added createlinks |
- added createlinks |
106 |
- added actions and crontab to download geoip database |
- added actions and crontab to download geoip database |
107 |
|
|
130 |
%prep |
%prep |
131 |
%setup |
%setup |
132 |
%patch0 -p1 |
%patch0 -p1 |
133 |
|
%patch1 -p1 |
134 |
|
%patch2 -p1 |
135 |
|
%patch3 -p1 |
136 |
|
|
137 |
%build |
%build |
138 |
%{__mkdir_p} root/var/lib/GeoIP |
%{__mkdir_p} root/var/lib/GeoIP |
144 |
rm -f %{name}-%{version}-filelist |
rm -f %{name}-%{version}-filelist |
145 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
146 |
|
|
147 |
|
cat %{name}-%{version}-filelist \ |
148 |
|
|grep -v 'etc/e-smith/templates/etc/GeoIP.conf' \ |
149 |
|
|grep -v 'usr/bin/geocity.pl' \ |
150 |
|
|grep -v 'usr/bin/geocountry.pl'\ |
151 |
|
|grep -v 'smeserver-geopip-download-action' \ |
152 |
|
|grep -v 'templates2expand/etc/GeoIP.conf' \ |
153 |
|
|grep -v '/etc/crontab/91_Update_Geoip_db' \ |
154 |
|
> %{name}-%{version}-filelist-v1 |
155 |
|
diff -u %{name}-%{version}-filelist %{name}-%{version}-filelist-v1 | grep -E "^\-"| sed -E 's/^\-//'|grep -v filelist > %{name}-%{version}-filelist-v2 |
156 |
|
|
157 |
%clean |
%clean |
158 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
159 |
|
|
161 |
|
|
162 |
%postun |
%postun |
163 |
|
|
164 |
%files -f %{name}-%{version}-filelist |
%files -f %{name}-%{version}-filelist-v1 |
165 |
%defattr(-,root,root) |
%defattr(-,root,root) |
166 |
|
|
167 |
|
|
168 |
|
|
169 |
|
%files -n smeserver-geoip2 -f %{name}-%{version}-filelist-v2 |
170 |
|
%defattr(-,root,root,-) |
171 |
|
|
172 |
|
%files -n smeserver-geoip1 -f %{name}-%{version}-filelist-v1 |
173 |
|
%defattr(-,root,root,-) |
174 |
|
|
175 |
|
|
176 |
|
|