199 lines
7.3 KiB
RPMSpec
199 lines
7.3 KiB
RPMSpec
|
%define name smeserver-geoip
|
||
|
%define version 1.2
|
||
|
%define release 19
|
||
|
|
||
|
Summary: SME Server geoip plugin
|
||
|
Name: %{name}
|
||
|
Version: %{version}
|
||
|
Release: %{release}%{?dist}
|
||
|
License: GPL
|
||
|
Group: Email
|
||
|
Source: %{name}-%{version}.tar.xz
|
||
|
Packager: Doug Kruhm <dakruhm@daknetworks.net>
|
||
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
|
||
|
BuildArchitectures: noarch
|
||
|
Requires: perl-GeoIP2
|
||
|
Requires: libmaxminddb >= 1.1.1
|
||
|
Requires: libmaxminddb-devel >= 1.1.1
|
||
|
Requires: geoipupdate
|
||
|
Requires: geolite2-country
|
||
|
Requires: geolite2-city
|
||
|
# for legacy
|
||
|
Requires: perl-Geo-IP
|
||
|
Requires: GeoIP >= 1.6.5
|
||
|
#
|
||
|
Provides: smeserver-geoip2 = %{version}-%{release}
|
||
|
PRovides: smeserver-geoip-legacy = %{version}-%{release}
|
||
|
BuildRequires: e-smith-devtools >= 1.13.1-03
|
||
|
|
||
|
%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 <countrycode> (i.e. config setprop qpsmtpd BadCountries BR)
|
||
|
SIGNAL EVENT: signal-event email-update
|
||
|
|
||
|
#----------------------------------------------------
|
||
|
#%package -n smeserver-geoip-legacy
|
||
|
#Summary: SME Server geoip plugin v1
|
||
|
#Group: Email
|
||
|
#Requires: perl-Geo-IP
|
||
|
#Requires: GeoIP >= 1.6.5
|
||
|
#Requires: smeserver-geoip = %{version}-%{release}
|
||
|
#BuildRequires: e-smith-devtools >= 1.13.1-03
|
||
|
#%description -n smeserver-geoip-legacy
|
||
|
#Package to use the legacy plugin. DB are not updated since 2018
|
||
|
#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.
|
||
|
#----------------------------------------------------
|
||
|
|
||
|
%changelog
|
||
|
* Sat Sep 07 2024 cvs2git.sh aka Brian Read <brianr@koozali.org> 1.2-19.sme
|
||
|
- Roll up patches and move to git repo [SME: 12338]
|
||
|
|
||
|
* Sat Sep 07 2024 BogusDateBot
|
||
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
|
||
|
by assuming the date is correct and changing the weekday.
|
||
|
Thu Jun 16 2007 --> Thu Jun 14 2007 or Sat Jun 16 2007 or Thu Jun 21 2007 or ....
|
||
|
|
||
|
* Thu Mar 18 2021 Brian Read <brianr@bjsystems.co.uk> 1.2-18.sme
|
||
|
- Add expand template for the qpsmtpd peers [SME: 11023]
|
||
|
|
||
|
* Sun Mar 14 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.2-17.sme
|
||
|
- merge legacy with main as we have few packages still using legacy [SME: 11023]
|
||
|
those are php*-pecl-geoip proftpd bind-libs* bind-utils.
|
||
|
|
||
|
* Sat Mar 13 2021 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-16.sme
|
||
|
- rebuild for SME10 [SME: 11023]
|
||
|
make geoip2 default
|
||
|
create geoip-legacy package with old geoip1 stuffs
|
||
|
smeserver-geoip(-legacy)-update events
|
||
|
|
||
|
* Tue Oct 06 2020 Brian Read <brianr@bjsystems.co.uk> 1.2-15.sme
|
||
|
- Import to SME10 tree [SME: 11023]
|
||
|
|
||
|
* Wed Jan 22 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-14.sme
|
||
|
- Change template from EditionID to ProductID
|
||
|
- fix 20databasestore has a trailing tilde
|
||
|
|
||
|
* Tue Jan 21 2020 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-13.sme
|
||
|
- add support for mmdblookup [SME: 10740]
|
||
|
- add support for download with AccountID and LicenseKey [SME: 10859]
|
||
|
|
||
|
* Sun Oct 20 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-10.sme
|
||
|
- fix country not logged if no badcountries defined [SME: 10815]
|
||
|
|
||
|
* Fri Oct 18 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-9.sme
|
||
|
- revert blocking country for geoipv1 qpsmtpd plugin [SME: 10820]
|
||
|
|
||
|
* Thu Jan 24 2019 Jean-Philipe Pialasse <tests@pialasse.com> 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 <jcrisp@safeandsoundit.co.uk> 1.2-7.sme
|
||
|
- Update check_badcountries to work with mailstats
|
||
|
|
||
|
* Sat Jan 05 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-6.sme
|
||
|
- remove crontab fragment for v1 [SME: 10691]
|
||
|
|
||
|
* Sat Jan 05 2019 Jean-Philipe Pialasse <tests@pialasse.com> 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 <tests@pialasse.com> 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 <jcrisp@safeandsoundit.co.uk> 1.2-3.sme
|
||
|
- Fix Use of uninitialized value $city in string eq
|
||
|
- Fix createlinks geoip-update action
|
||
|
|
||
|
* Sat Jun 23 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-2.sme
|
||
|
- Fix typo in createlinks
|
||
|
|
||
|
* Tue Jun 12 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 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 <tests@pialasse.com> 1.1.2-7.sme
|
||
|
- update requirement for GeoIP 1.6.5 [SME: 9714]
|
||
|
|
||
|
* Thu Dec 22 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 1.1.2-6
|
||
|
- Use newer versions of GeoIP databases [SME: 9714]
|
||
|
|
||
|
* Wed Sep 23 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 1.1.2-5
|
||
|
- Add ability to whitelist an IP [SME:8981]
|
||
|
|
||
|
* Tue Sep 22 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.1.2-4
|
||
|
- the event geoip-update download the geoip database
|
||
|
- added smeserver-geoip-1.1.2.geoip-update-event.patch
|
||
|
|
||
|
* Sun Jun 14 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.1.2-2
|
||
|
- added createlinks
|
||
|
- added actions and crontab to download geoip database
|
||
|
|
||
|
* Mon Sep 03 2012 Doug Kruhm <dakruhm@daknetworks.net> 1.0.5
|
||
|
- defining $country to reduce noise if not found [SME: 5011]
|
||
|
- fixed misspelling in response if country is blocked [SME: 7058]
|
||
|
- cleaning up versioning to MAJOR-MINOR-PATCH
|
||
|
|
||
|
* Fri May 01 2009 Doug Kruhm <dakruhm@daknetworks.net> 1.0.0-04
|
||
|
- added response to connecting server if blocked [SME: 5011]
|
||
|
|
||
|
* Fri May 01 2009 Doug Kruhm <dakruhm@daknetworks.net> 1.0.0-03
|
||
|
- added line to reduce log noise [SME: 5011]
|
||
|
|
||
|
* Fri May 01 2009 Doug Kruhm <dakruhm@daknetworks.net> 1.0.0-02
|
||
|
- db defaults migrated from SPEC file to rpm files [SME: 5193]
|
||
|
- removed %post and %postun macros [SME: 5194]
|
||
|
- added Requires perl-Geo-IP [SME: 1866]
|
||
|
- added e-smith-devtools as a requirement [SME: 1866]
|
||
|
|
||
|
* Sat Jun 16 2007 Doug Kruhm <dakruhm@daknetworks.net>
|
||
|
Thu Jun 16 2007 --> Thu Jun 14 2007 or Sat Jun 16 2007 or Thu Jun 21 2007 or ....
|
||
|
- 1.0.0-01
|
||
|
- Original version
|
||
|
|
||
|
|
||
|
%prep
|
||
|
%setup
|
||
|
rm -rf root/var/
|
||
|
# commented for legacy
|
||
|
#mkdir -p root/etc/e-smith/events/smeserver-geoip-legacy
|
||
|
|
||
|
%build
|
||
|
perl createlinks
|
||
|
|
||
|
%install
|
||
|
rm -rf $RPM_BUILD_ROOT
|
||
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
|
||
|
rm -f %{name}-%{version}-filelist
|
||
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
||
|
--file /usr/bin/geoiplook 'attr(0755,root,root)' \
|
||
|
> %{name}-%{version}-filelist
|
||
|
|
||
|
cat %{name}-%{version}-filelist \
|
||
|
|grep -v 'etc/e-smith/events/smeserver-geoip-legacy' \
|
||
|
> %{name}-%{version}-filelist-base
|
||
|
#cat %{name}-%{version}-filelist \
|
||
|
#|grep 'etc/e-smith/events/smeserver-geoip-legacy' \
|
||
|
#> %{name}-%{version}-filelist-legacy
|
||
|
|
||
|
|
||
|
%clean
|
||
|
rm -rf $RPM_BUILD_ROOT
|
||
|
|
||
|
%post
|
||
|
|
||
|
%postun
|
||
|
|
||
|
%files -f %{name}-%{version}-filelist-base
|
||
|
%defattr(-,root,root)
|
||
|
|
||
|
|
||
|
|
||
|
#%files -n smeserver-geoip-legacy -f %{name}-%{version}-filelist-legacy
|
||
|
#%defattr(-,root,root,-)
|
||
|
|
||
|
|
||
|
|