SPF and greylisting with python, without perl!

This commit is contained in:
Micha Glave 2009-06-24 11:57:54 +00:00
parent 067137baa1
commit 793fa73d8e
2 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,2 @@
DIST tumgreyspf-1.34.tar.gz 28946 RMD160 a209bc4c57e6884c1b3ef10f41968b2b7c09c39f SHA1 9190a74470f4f21e66299d7423976119cee3b1cc SHA256 9d9c25b58e321ce7a026e18233f8760359bb38be1bdfe0ac04bb8a6d9faba03b
EBUILD tumgreyspf-1.34.ebuild 1742 RMD160 b00cdcbddac7f30857e22198723f3e1c87d502e8 SHA1 c4e79404c8fb6e8ffa7130f37a7d3d28239433a8 SHA256 e19af03742405528ebfd5f63dfa7722e9e110caeb8f2e57090dd8830c88aa051

View File

@ -0,0 +1,71 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# Author Micha Glave <gentoo@migmedia.de>
inherit eutils
DESCRIPTION="spf policy server written in python for Postfix"
HOMEPAGE="http://www.tummy.com/Community/software/tumgreyspf/"
SRC_URI="ftp://ftp.tummy.com/pub/tummy/tumgreyspf/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""
DEPEND="virtual/python"
RDEPEND="${DEPEND}
dev-python/pyspf
>=mail-mta/postfix-2.1"
# TODO
# example for master.cf
# make sure it works(!)
src_unpack() {
unpack ${A}
cd ${S}
# fix invalid path in sources
sed -i \
-e "s!/usr/local/lib/tumgreyspf/spfquery!/usr/bin/spfquery.py!g" \
-e "s!/usr/lib/tumgreyspf/tumgreyspf!/usr/bin/tumgreyspf!g" \
-e "s!/usr/local/lib/tumgreyspf!/usr/bin!g" \
-e "s!/var/local/lib/tumgreyspf/config/!/etc/tumgreyspf/!g" \
-e "s!/var/local/lib/!/var/lib/!g" \
-e "s!tumgreyspf_user = 'nobody'!tumgreyspf_user = '${PN}'!" \
* || die "fixing pathnames failed"
}
src_install() {
local MY_FILES
local MY_FILE
MY_FILES="TODO LICENSE README WHATSNEW
README.performance README.QuickStart"
for MY_FILE in $MY_FILES; do
dodoc $MY_FILE
done
doman tumgreyspf.8
insinto /etc/${PN}
doins tumgreyspf.conf
insinto /etc/${PN}
newins __default__.dist __default__
MY_FILES="tumgreyspf tumgreyspf-clean tumgreyspf-configtest
tumgreyspf-install tumgreyspf-stat tumgreyspfsupp.py"
for MY_FILE in $MY_FILES; do
dobin $MY_FILE
done
}
pkg_preinst() {
enewgroup ${PN}
enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
dodir /var/lib/${PN}/data
dodir /var/lib/${PN}/data/blackhole
fowners ${PN}:${PN} /var/lib/${PN}/data
fperms 700 /var/lib/${PN}/data
}