--- rpms/smeserver-geoip/contribs9/smeserver-geoip.spec 2015/09/23 20:25:41 1.5 +++ rpms/smeserver-geoip/contribs9/smeserver-geoip.spec 2020/01/21 20:21:36 1.19 @@ -1,6 +1,6 @@ %define name smeserver-geoip -%define version 1.1.2 -%define release 5 +%define version 1.2 +%define release 12 Summary: SME Server geoip plugin Name: %{name} @@ -12,19 +12,105 @@ Source: %{name}-%{version}.tar.gz Packager: Doug Kruhm BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch -Requires: perl-Geo-IP +Requires: GeoIP >= 1.6.5 BuildRequires: e-smith-devtools >= 1.13.1-03 -Patch0 : smeserver-geoip-remove-createlink-add-geoip-download-actions.patch -Patch1: smeserver-geoip-1.1.2.geoip-update-event.patch -Patch2: smeserver-geoip-whitelist_by_IP.patch +Patch0: smeserver-geoip-conf-typo.patch +Patch1: smeserver-geoip-fix-city-createlinks.patch +Patch2: smeserver-geoip-1.2-check_badcountries.patch +Patch3: smeserver-geoip-1.2-check_badcountries-mailstats.patch +Patch4: smeserver-geoip-1.2-bz10820-geoipv1-blockvountries-qpsmtpd.patch +Patch5: smeserver-geoip-1.2-bz10815-display-country.patch +Patch6: smeserver-geoip-1.2-bz10859-bz10740.patch + %description 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 (i.e. config setprop qpsmtpd BadCountries BR) SIGNAL EVENT: signal-event email-update +#---------------------------------------------------- + +%package -n smeserver-geoip1 +Summary: SME Server geoip plugin v1 +Group: Email +Requires: perl-Geo-IP +Requires: GeoIP >= 1.6.5 +BuildRequires: e-smith-devtools >= 1.13.1-03 + +%description -n smeserver-geoip1 +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 (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 +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 (i.e. config setprop qpsmtpd BadCountries BR) +SIGNAL EVENT: signal-event email-update +#---------------------------------------------------- + %changelog -%changelog +* Tue Jan 21 2020 Jean-Philipe Pialasse 1.2-12.sme +- add support for mmdblookup [SME: 10740] +- add support for download with AccountID and LicenseKey [SME: 10859] + +* Sun Oct 20 2019 Jean-Philipe Pialasse 1.2-10.sme +- fix country not logged if no badcountries defined [SME: 10815] + +* Fri Oct 18 2019 Jean-Philipe Pialasse 1.2-9.sme +- revert blocking country for geoipv1 qpsmtpd plugin [SME: 10820] + +* Thu Jan 24 2019 Jean-Philipe Pialasse 1.2-8.sme +- make smeserver-geoip2 requires smeserver-geoip [SME: 10691] + this will avoid having both packages sharing few files. + +* Tue Jan 15 2019 John Crisp 1.2-7.sme +- Update check_badcountries to work with mailstats + +* Sat Jan 05 2019 Jean-Philipe Pialasse 1.2-6.sme +- remove crontab fragment for v1 [SME: 10691] + +* Sat Jan 05 2019 Jean-Philipe Pialasse 1.2-5.sme +- fix wrong loglevel LOGINFO instead of LOGNOTICE needed [SME: 10679] +- try first db v2 and back on v1 if not available [SME: 10691] +- workaround FATAL PLUGIN ERROR when method name_by_addr not existing priori geo-ip 1.39 [SME: 10691] + +* Fri Jan 04 2019 Jean-Philipe Pialasse 1.2-4.sme +- split smeserver-geoip into smeserver-geoip and smeserver-geoip2 for compatibility [SME: 10691] +- TODO: workaround to find for plugin compatibility + +* Mon Oct 29 2018 John Crisp 1.2-3.sme +- Fix Use of uninitialized value $city in string eq +- Fix createlinks geoip-update action + +* Sat Jun 23 2018 John Crisp 1.2-2.sme +- Fix typo in createlinks + +* Tue Jun 12 2018 John Crisp 1.2-1.sme +- Update to latest v2 DBs [SME: 9033] +- add geocity.pl and geocountry.pl test files + +* Wed Feb 15 2017 Jean-Philipe Pialasse 1.1.2-7.sme +- update requirement for GeoIP 1.6.5 [SME: 9714] + +* Thu Dec 22 2016 John Crisp 1.1.2-6 +- Use newer versions of GeoIP databases [SME: 9714] + * Wed Sep 23 2015 John Crisp 1.1.2-5 - Add ability to whitelist an IP [SME:8981] @@ -63,6 +149,10 @@ SIGNAL EVENT: signal-event email-update %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build %{__mkdir_p} root/var/lib/GeoIP @@ -74,6 +164,17 @@ rm -rf $RPM_BUILD_ROOT rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist +cat %{name}-%{version}-filelist \ +|grep -v 'etc/e-smith/templates/etc/GeoIP.conf' \ +|grep -v 'usr/bin/geocity.pl' \ +|grep -v 'usr/bin/geocountry.pl'\ +|grep -v 'smeserver-geopip-download-action' \ +|grep -v 'templates2expand/etc/GeoIP.conf' \ +|grep -v '/etc/crontab/91_Update_Geoip_db' \ +|grep -v '/usr/bin/geoiplook' \ + > %{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 + %clean rm -rf $RPM_BUILD_ROOT @@ -81,5 +182,16 @@ rm -rf $RPM_BUILD_ROOT %postun -%files -f %{name}-%{version}-filelist +%files -f %{name}-%{version}-filelist-v1 %defattr(-,root,root) + + + +%files -n smeserver-geoip2 -f %{name}-%{version}-filelist-v2 +%defattr(-,root,root,-) + +%files -n smeserver-geoip1 -f %{name}-%{version}-filelist-v1 +%defattr(-,root,root,-) + + +