Search
j0ke.net Open Build Service
>
Projects
>
server:mail
>
qmail-spp-plugins-greylisting
> greylisting-spp.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File greylisting-spp.spec of Package qmail-spp-plugins-greylisting (Revision 3)
Currently displaying revision
3
,
show latest
%define qdir /var/qmail Summary: "Greylisting" plugin for qmail-smtp Name: greylisting-spp Version: 1.0.1 Release: 2 License: GPLv2 Group: System/Mail URL: http://www.unix-ag.uni-kl.de/~conrad/greylisting/ Source0: http://www.unix-ag.uni-kl.de/~conrad/greylisting/greylisting-spp-%{version}.tar.gz Source1: greylisting.cron Patch0: greylisting-spp-Makefile.patch Patch1: greylisting-spp-1.0.1.patch Requires: qmail BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: sqlite-devel Requires: sqlite3 %description "Greylisting" is a technique to filter certain malware (SPAM and email worms) at the SMTP level. See http://greylisting.org/ for a better description.. This package implements Greylisting for D. J. Bernstein's "qmail" MTA (http://qmail.org/ ). It requires qmail to be compiled with the smtp-plugin-patch (http://qmail-spp.sourceforge.net/ ), version 0.4 or later, hence the name. %prep %setup %patch0 %patch1 -p1 %build %__make %install mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.d install -m644 %{S:1} $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/greylisting mkdir -p $RPM_BUILD_ROOT%{qdir}/plugins mkdir -p $RPM_BUILD_ROOT%{qdir}/greylisting %__install -m 0755 -d %{buildroot}%{qdir}/supervise/qmail-smtpd/env install -m 0755 ,,build/src/greylisting-spp $RPM_BUILD_ROOT%{qdir}/plugins echo 86400 > %{buildroot}%{qdir}/supervise/qmail-smtpd/env/GL_ACCEPT_GOOD echo %{qdir}/greylisting/greylisting-db > %{buildroot}%{qdir}/supervise/qmail-smtpd/env/GL_DATABASE echo 43200 > %{buildroot}%{qdir}/supervise/qmail-smtpd/env/GL_MAX_WAIT echo 60 > %{buildroot}%{qdir}/supervise/qmail-smtpd/env/GL_MIN_REJECT %post cd %{qdir}/control if [ "$1" -ge 1 -a `grep -c plugins/greylisting-spp smtpplugins` -eq 0 ]; then echo Trying to insert plugin into %{qdir}/control/smtpplugins... if grep '^\[mail\]$' smtpplugins >/dev/null; then i=1 while [ `head -$i smtpplugins | grep -c '^\[mail\]$'` -lt 1 ]; do i=$(($i + 1)) done head -$i smtpplugins >smtpplugins.new tail +$(($i + 1)) smtpplugins >>smtpplugins.new && \ mv smtpplugins.new smtpplugins else echo "[mail]" >>smtpplugins fi if grep '^\[rcpt\]$' smtpplugins >/dev/null; then i=1 while [ `head -$i smtpplugins | grep -c '^\[rcpt\]$'` -lt 1 ]; do i=$(($i + 1)) done head -$i smtpplugins >smtpplugins.new echo "plugins/greylisting-spp" >>smtpplugins.new tail +$(($i + 1)) smtpplugins >>smtpplugins.new && \ mv smtpplugins.new smtpplugins else echo "[rcpt]" >>smtpplugins echo "plugins/greylisting-spp" >>smtpplugins fi echo "Don't forget to set the required environment variables" echo "when invoking qmail-smtpd." echo "And think about whitelisting some addresses, see %{_docdir}/%{name}." fi %preun if [ "$1" = 0 ]; then cd %{qdir}/control if [ -r smtpplugins ]; then echo Trying to remove greylisting-spp from %{qdir}/control/smtpplugins... egrep -v '^#*plugins/greylisting-spp$' smtpplugins >smtpplugins.new && \ mv smtpplugins.new smtpplugins fi fi %clean [ "$RPM_BUILD_ROOT" = "/" ] || rm -rf "$RPM_BUILD_ROOT" %files %defattr(-,root,qmail) %doc doc/* ,,build/doc/whitelist.tcpserver %{_sysconfdir}/cron.d/greylisting %dir %{qdir} %dir %{qdir}/plugins %dir %{qdir}/supervise %dir %{qdir}/supervise/qmail-smtpd %dir %{qdir}/supervise/qmail-smtpd/env %{qdir}/plugins/greylisting-spp %dir %attr(0700,qmaild,qmail) %{qdir}/greylisting %attr(-,qmaill,qmail) %{qdir}/supervise/qmail-smtpd/env/* %changelog * Sat Feb 27 2010 Carsten Schoene <cs@linux-administrator.com> - 1.0.1-2 - added sqlite3 patch - added database VACUUM cron * Sun Apr 27 2008 - Peter Conrad <conrad@quisquis.de> - Upgrade to bugfix version 1.0.1 * Sun Dec 2 2007 - Peter Conrad <conrad@quisquis.de> - Added URL header - Added source URL * Thu Nov 15 2007 - Peter Conrad <conrad@quisquis.de> - Turned Copyright header into License - Improved %preun-script * Thu Feb 03 2005 - conrad@tivano.de - Documented requirement qmail-spp version 0.40 or later - Bumped version number * Wed Sep 29 2004 - conrad@tivano.de - Really fixed %post * Mon Sep 27 2004 - conrad@tivano.de - Fixed %post and %preun scripts * Wed Sep 08 2004 - conrad@tivano.de - Bumped version number - Added database directory * Tue Aug 24 2004 - conrad@tivano.de - Created spec file # Do not change the following line: # arch-tag: 26dd308a-26de-416a-ab01-c813f67a42e6