Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:p_conrad
greylisting-spp
greylisting-spp.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File greylisting-spp.spec of Package greylisting-spp
%define QMAIL_DIR /var/lib/qmail Summary: "Greylisting" plugin for qmail-smtp Name: greylisting-spp Version: 1.1 Release: 2 License: GPL Group: Productivity/Networking/Email/Servers URL: http://www.unix-ag.uni-kl.de/~conrad/greylisting/ Source: http://www.unix-ag.uni-kl.de/~conrad/greylisting/greylisting-spp-%{version}.tar.gz Requires: netqmail-smtpd BuildRequires: netqmail-smtpd sqlite3-devel %if 0%{?suse_version} >= 1100 && 0%{?suse_version} < 1150 BuildRequires: licenses Requires: licenses %endif %if 0%{?fedora} > 0 # Resolve stupid ambiguous dependency BuildRequires: cronie-anacron %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %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 -q %build make CFLAGS="%{optflags}" LDFLAGS="%{optflags}" DB_IMPL=sqlite3 %{?_smp_mflags} lic="`md5sum doc/COPYING | cut -d' ' -f 1`" if [ -r "/usr/share/doc/licenses/md5/$lic" ]; then ln -sf /usr/share/doc/licenses/md5/"$lic" doc/COPYING fi %install mkdir -p "%{buildroot}%{_libexecdir}/qmail/plugins" mkdir -p "%{buildroot}%{QMAIL_DIR}/greylisting" install -m 0755 ,,build/src/greylisting-spp "%{buildroot}%{_libexecdir}/qmail/plugins" mkdir -p "%{buildroot}%{_sysconfdir}/qmail/env" echo "%{QMAIL_DIR}/greylisting/greylisting.sqlite3" >"%{buildroot}%{_sysconfdir}/qmail/env/GL_DATABASE" %__debug_install_post %post cd "%{QMAIL_DIR}/control" if [ "$1" -ge 1 -a `grep -c plugins/greylisting-spp smtpplugins` -eq 0 ]; then echo "Trying to insert plugin into %{QMAIL_DIR}/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 -n +$(($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 -n +$(($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 "%{QMAIL_DIR}/control" if [ -r smtpplugins ]; then echo "Trying to remove greylisting-spp from %{QMAIL_DIR}/control/smtpplugins..." grep -vE '^#*plugins/greylisting-spp$' smtpplugins >smtpplugins.new && \ mv smtpplugins.new smtpplugins fi fi %clean [ "%{buildroot}" = "/" ] || rm -rf "%{buildroot}" %files %defattr(-,root,mail,-) %doc doc/[CRT]* ,,build/doc/whitelist.tcpserver %config(noreplace) %{_sysconfdir}/qmail/env/GL_DATABASE %{_libexecdir}/qmail/plugins/greylisting-spp %dir %attr(0700,qmaild,mail) %{QMAIL_DIR}/greylisting %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor