|
@@ -0,0 +1,123 @@
|
|
|
|
|
+##
|
|
|
|
|
+## postgrey.spec -- OpenPKG RPM Specification
|
|
|
|
|
+## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
|
|
|
|
|
+## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
|
|
|
|
|
+## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
|
|
|
|
|
+##
|
|
|
|
|
+## Permission to use, copy, modify, and distribute this software for
|
|
|
|
|
+## any purpose with or without fee is hereby granted, provided that
|
|
|
|
|
+## the above copyright notice and this permission notice appear in all
|
|
|
|
|
+## copies.
|
|
|
|
|
+##
|
|
|
|
|
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
|
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
|
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
|
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
|
|
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
|
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
|
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
|
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
|
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
|
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
|
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
|
+## SUCH DAMAGE.
|
|
|
|
|
+##
|
|
|
|
|
+
|
|
|
|
|
+# package information
|
|
|
|
|
+Name: postgrey
|
|
|
|
|
+Summary: Postfix Greylisting Daemon
|
|
|
|
|
+URL: http://isg.ee.ethz.ch/tools/postgrey/
|
|
|
|
|
+Vendor: David Schweikert
|
|
|
|
|
+Packager: The OpenPKG Project
|
|
|
|
|
+Distribution: OpenPKG
|
|
|
|
|
+Class: EVAL
|
|
|
|
|
+Group: Mail
|
|
|
|
|
+License: GPL
|
|
|
|
|
+Version: 1.2
|
|
|
|
|
+Release: 20040521
|
|
|
|
|
+
|
|
|
|
|
+# list of sources
|
|
|
|
|
+Source0: http://isg.ee.ethz.ch/tools/postgrey/pub/postgrey-%{version}.tar.gz
|
|
|
|
|
+Source1: rc.postgrey
|
|
|
|
|
+Patch0: postgrey.patch
|
|
|
|
|
+
|
|
|
|
|
+# build information
|
|
|
|
|
+Prefix: %{l_prefix}
|
|
|
|
|
+BuildRoot: %{l_buildroot}
|
|
|
|
|
+BuildPreReq: OpenPKG, openpkg >= 20040130
|
|
|
|
|
+PreReq: OpenPKG, openpkg >= 20040130
|
|
|
|
|
+BuildPreReq: perl
|
|
|
|
|
+PreReq: perl, perl-sys, perl-net, perl-db
|
|
|
|
|
+AutoReq: no
|
|
|
|
|
+AutoReqProv: no
|
|
|
|
|
+
|
|
|
|
|
+%description
|
|
|
|
|
+ Postgrey is a Postfix MTA policy server implementing Greylisting.
|
|
|
|
|
+ Greylisting is related to Whitelisting and Blacklisting. What
|
|
|
|
|
+ happen is that each time a given mailbox receives an email from
|
|
|
|
|
+ an unknown contact (ip), that mail is rejected with a "try again
|
|
|
|
|
+ later"-message. This, in the short run, means that all mail gets
|
|
|
|
|
+ delayed atleast until the sender tries again - but this is where
|
|
|
|
|
+ spam looses out! Most spam is not sent out using RFC compliant MTAs;
|
|
|
|
|
+ the spamming software will not try again later.
|
|
|
|
|
+
|
|
|
|
|
+%track
|
|
|
|
|
+ prog postgrey = {
|
|
|
|
|
+ version = %{version}
|
|
|
|
|
+ url = http://isg.ee.ethz.ch/tools/postgrey/pub/
|
|
|
|
|
+ regex = postgrey-(__VER__)\.tar\.gz
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+%prep
|
|
|
|
|
+ %setup -q
|
|
|
|
|
+ %patch -p0
|
|
|
|
|
+
|
|
|
|
|
+%build
|
|
|
|
|
+ # build manual page
|
|
|
|
|
+ pod2man postgrey >postgrey.8
|
|
|
|
|
+
|
|
|
|
|
+ # build empty recipient list
|
|
|
|
|
+ echo "" >postgrey_recipient_access
|
|
|
|
|
+
|
|
|
|
|
+%install
|
|
|
|
|
+ # create installation hierarchy
|
|
|
|
|
+ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/sbin \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/postgrey \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/var/postgrey
|
|
|
|
|
+
|
|
|
|
|
+ # install program and manual page
|
|
|
|
|
+ %{l_shtool} install -c -m 755 \
|
|
|
|
|
+ -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;g' \
|
|
|
|
|
+ postgrey $RPM_BUILD_ROOT%{l_prefix}/sbin/
|
|
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
|
|
+ postgrey.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
|
|
|
|
|
+
|
|
|
|
|
+ # install configuration files
|
|
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
|
|
+ postgrey_client_access \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/postgrey/
|
|
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
|
|
+ postgrey_recipient_access \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/postgrey/
|
|
|
|
|
+
|
|
|
|
|
+ # install run-command script
|
|
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
|
|
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
|
|
|
|
|
+ %{SOURCE rc.postgrey} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
|
|
+
|
|
|
|
|
+ # determine installation files
|
|
|
|
|
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
|
|
+ %{l_files_std} \
|
|
|
|
|
+ '%config %{l_prefix}/etc/postgrey/*' \
|
|
|
|
|
+ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/postgrey'
|
|
|
|
|
+
|
|
|
|
|
+%files -f files
|
|
|
|
|
+
|
|
|
|
|
+%clean
|
|
|
|
|
+ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
+
|