--- rpms/smeserver-geoip/contribs9/smeserver-geoip.spec 2015/06/15 19:05:46 1.2 +++ rpms/smeserver-geoip/contribs9/smeserver-geoip.spec 2015/09/22 21:41:35 1.3 @@ -1,6 +1,6 @@ %define name smeserver-geoip %define version 1.1.2 -%define release 2 +%define release 3 Summary: SME Server geoip plugin Name: %{name} @@ -15,6 +15,7 @@ BuildArchitectures: noarch Requires: perl-Geo-IP BuildRequires: e-smith-devtools >= 1.13.1-03 Patch0 : smeserver-geoip-remove-createlink-add-geoip-download-actions.patch +Patch1: smeserver-geoip-1.1.2.Remove_GEOIP_Download_Action.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. @@ -22,6 +23,10 @@ CHANGE THE CONFIG DB: config setprop qps SIGNAL EVENT: signal-event email-update %changelog +* Tue Sep 22 2015 stephane de Labrusse 1.1.2-3 +- the action to download the geoip database is removed +- added smeserver-geoip-1.1.2.Remove_GEOIP_Download_Action.patch + * Sun Jun 14 2015 stephane de Labrusse 1.1.2-2 - added createlinks - added actions and crontab to download geoip database @@ -51,6 +56,7 @@ SIGNAL EVENT: signal-event email-update %prep %setup %patch0 -p1 +%patch1 -p1 %build %{__mkdir_p} root/var/lib/GeoIP @@ -66,6 +72,9 @@ rm -f %{name}-%{version}-filelist rm -rf $RPM_BUILD_ROOT %post +#download the first time the geoip database +wget -O /var/lib/GeoIP/GeoIP.dat.gz http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz 2>&1 1>/dev/null +gunzip -f /var/lib/GeoIP/GeoIP.dat.gz 2>&1 1>/dev/null %postun