File policyd-weight.spec of Package policyd-weight

# spec file for package policyd-weight (Version 0.1.14-beta-17)
# Copyright (c) 2008 Heinlein Professional Linux Support GmbH
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
# Please submit bugfixes or comments via

# norootforbuild

Name:           policyd-weight
Requires:       perl >= 5.6.0, perl-Net-Server, perl-Net-DNS libmagic1
# PreReq:         %insserv_prereq, %fillup_prereq /usr/sbin/useradd /usr/sbin/groupadd
PreReq:         /usr/sbin/useradd /usr/sbin/groupadd
License:        GPL v2 or later
Group:          Productivity/Networking/Email/Utilities
Summary:        Postfix policyd-weight policy server
Version:        0.1.15b2
Release:        1.0
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %{name}.tar.bz2
Source1:        %{name}.init
Patch0:			njabl.patch
Packager:	Peer Heinlein <>

policyd-weight is a powerful anti-spam Postfix policy server. It checks the
clients DNS and HELO-hostname setup in compliance with several RFCs and checks 
several RBL-lists in a weighted mechanism. 

It works good against botnets and other faking mass-mailer. policyd-weight is 
a good partner for a greylisting-daemon like postgrey.

Add a "check_policy_service inet:" to your 
smtpd_recipient_restriction, which is defined in your of Postfix. 

See for more details.

Known bugs of this RPM:
    * policyd-weight has to be started for uninstalling the RPM.

    Robert Felber <r.felber@ek-muc.d>

%patch0 -p0


# the binaries
install -d %{buildroot}/%{_sbindir}
install -m 0755 policyd-weight %{buildroot}/%{_sbindir}/%{name}
# init file and configuration
install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/%{name}
ln -sf /etc/init.d/%{name} $RPM_BUILD_ROOT/usr/sbin/rc%{name}

/usr/sbin/groupadd --system polw 2> /dev/null || :
/usr/sbin/useradd -r -g polw -s /bin/false -c "policyd-weight" polw 2> /dev/null || :

#%stop_on_removal %{name}

%{fillup_and_insserv %{name}}

%restart_on_update %{name}

%config %attr(0755,root,root) /etc/init.d/%{name}

* Sun Nov 15 2008
- initial version 0.1.14-beta-17 1.0