File greylistd.spec of Package greylistd

#
# spec file for package greylistd (Version 0.8.3.2)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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 http://bugs.opensuse.org/
#


Name:           greylistd
Url:            http://slett.net/spam-filtering-for-mx/greylisting.html
#URL:          http://packages.debian.org/unstable/mail/greylistd
License:        GPL
Group:          Productivity/Networking/Other
Autoreqprov:    on
BuildRequires:  python
Requires:       python
%if 0%{?suse_version}
PreReq:         %insserv_prereq %fillup_prereq 
%endif
Version:        0.8.7+nmu1
Release:        1
Summary:        Simple greylisting daemon for use with Exim & other MTAs
Source:         http://ftp.debian.org/debian/pool/main/g/greylistd/greylistd_%{version}.tar.gz
Source1:        greylistd.init
Source2:        greylistd.sysconfig
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This daemon provides a simple greylisting implementation for use with Exim and other mail transport agents (MTAs). For an
introduction to greylisting, please refer to Evan Harris' whitepaper at:

     http://projects.puremagic.com/greylisting/

In essense, greylisting is a simple but highly effective means to weed out messages that are being delivered via spamware/
ratware tools. The idea is to establish whether a prior relationship exists between the sender and the receiver of a message.
Most of the time it does, and the delivery proceeds normally.

On the other hand, if no prior relationship exists, the delivery is temporariliy rejected (using a 451 SMTP response).
Legitimate MTAs will treat this response accordingly, and retry the delivery in a little while. In contrast, ratware will often
try to hammer on your server repeatedly within a short period of time (i.e. seconds), and/or simply give up and move on to the
next target in its address list.

The package contains a sample configuration snippet for use with Exim 4.

Authors:
--------
	Tor Slettnes <tor@slett.net>


%prep
%setup

%build

%install
rm -rf $RPM_BUILD_ROOT
install -D program/greylistd	$RPM_BUILD_ROOT/%{_sbindir}/greylistd
install -D program/greylist	$RPM_BUILD_ROOT/%{_bindir}/greylist
install -D %{S:1}		$RPM_BUILD_ROOT/etc/init.d/greylistd
install -D -m 0644 config/config 	$RPM_BUILD_ROOT/etc/greylistd/config
install -D -m 0644 config/whitelist-hosts $RPM_BUILD_ROOT/var/lib/greylistd/whitelist-hosts
install -d $RPM_BUILD_ROOT/var/run/greylistd
install -d $RPM_BUILD_ROOT/etc/greylistd
install -D -m 0644 doc/man1/greylist.1	$RPM_BUILD_ROOT/%{_mandir}/man1/greylist.1
install -D -m 0644 doc/man8/greylistd.8	$RPM_BUILD_ROOT/%{_mandir}/man8/greylistd.8
ln -s ../../etc/init.d/greylistd $RPM_BUILD_ROOT/%{_sbindir}/rcgreylistd
install -D -m 0644 %{S:2} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.greylistd

%clean
if ! test -f /.buildenv; then 
	rm -rf $RPM_BUILD_ROOT
fi

%if 0%{?suse_version}
%post
%{fillup_and_insserv greylistd}
test -s etc/greylistd/whitelist-hosts || { cp -p usr/share/doc/packages/greylistd/examples/whitelist-hosts etc/greylistd; }
exit 0

%preun
%stop_on_removal exim

%postun
%insserv_cleanup
%endif

%files
%defattr(-,root,root)
%doc debian/README.Debian debian/changelog debian/copyright doc/examples
%{_sbindir}/*
%{_bindir}/*
/etc/init.d/greylistd
%dir /etc/greylistd
%dir %attr(750,mail,mail) /var/lib/greylistd
%dir %attr(755,mail,mail) %ghost /var/run/greylistd
%config(noreplace) /etc/greylistd/config
%config(noreplace) /var/lib/greylistd/whitelist-hosts
%doc %{_mandir}/man1/*
%doc %{_mandir}/man8/*
/var/adm/fillup-templates/sysconfig.greylistd

%changelog -n greylistd
* Wed Nov 29 2006 - poeml@suse.de
- fix whitelist to be a "host list" parsable by exim (it needs
  correct IP addresses with or without netmask)
  greylistd-0.8.3.2-whitelist_for_exim.patch
- in %%post, install example /etc/greylistd/whitelist-hosts if not
  present already
* Mon Nov 27 2006 - poeml@suse.de
- fix permissions of non-executable files
* Mon Nov 27 2006 - poeml@suse.de
- update to 0.8.3.2
  (only Debian-related changes)
* Thu Nov 02 2006 - poeml@suse.de
- greylistd should not start after exim -- the opposite is the
  case
* Sun Oct 15 2006 - poeml@suse.de
- update to 0.8.3.1
  * Fix a bug with blacklist treated as whitelist
  * Fix text wrapped in exim4-acl-example.txt
  * Add vi translation
  * Add ja translation
  * Add cs translation
* Sat Jun 03 2006 - poeml@suse.de
- update to 0.8.3
* Tue Jan 04 2005 - poeml@suse.de
- update to 0.7
* Fri Dec 10 2004 - poeml@suse.de
- new packages (0.5.3)
openSUSE Build Service is sponsored by