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