1 |
# $Id$ |
2 |
# Authority: ???? |
3 |
# Name: Thouvenin Romain |
4 |
|
5 |
%define name smeserver-geoip |
6 |
%define version 1.0.0 |
7 |
%define release b1 |
8 |
|
9 |
Summary: SME Server geoip plugin |
10 |
Name: %{name} |
11 |
Version: %{version} |
12 |
Release: %{release} |
13 |
License: GPL |
14 |
Group: Email |
15 |
Source: %{name}-%{version}.tar.gz |
16 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
17 |
BuildArchitectures: noarch |
18 |
|
19 |
%description |
20 |
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. |
21 |
|
22 |
CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR) |
23 |
SIGNAL EVENT: signal-event email-update |
24 |
|
25 |
%changelog |
26 |
* Thu Jun 16 2007 Doug Kruhm <dakruhm@daknetworks.net> |
27 |
- 1.0.0-01 |
28 |
- Original version |
29 |
|
30 |
%prep |
31 |
%setup |
32 |
|
33 |
%build |
34 |
|
35 |
DEFAULTS=root/etc/e-smith/db/configuration/defaults/qpsmtpd |
36 |
mkdir -p $DEFAULTS |
37 |
|
38 |
echo "enabled" > $DEFAULTS/GeoIP |
39 |
echo "" > $DEFAULTS/BadCountries |
40 |
|
41 |
|
42 |
%install |
43 |
rm -rf $RPM_BUILD_ROOT |
44 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
45 |
rm -f %{name}-%{version}-filelist |
46 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
47 |
|
48 |
%clean |
49 |
rm -rf $RPM_BUILD_ROOT |
50 |
|
51 |
%post |
52 |
/etc/e-smith/events/actions/initialize-default-databases |
53 |
/sbin/e-smith/expand-template /var/service/qpsmtpd/config/badcountries |
54 |
/sbin/e-smith/expand-template /var/service/qpsmtpd/config/peers/0 |
55 |
true |
56 |
|
57 |
%postun |
58 |
/sbin/e-smith/expand-template /var/service/qpsmtpd/config/peers/0 |
59 |
true |
60 |
|
61 |
%files -f %{name}-%{version}-filelist |
62 |
%defattr(-,root,root) |