summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Kacian <ticho@gentoo.org>2005-11-03 22:38:03 +0000
committerAndrej Kacian <ticho@gentoo.org>2005-11-03 22:38:03 +0000
commitda86c6d87097a9bf63d641223aefd57167a0795a (patch)
treecdcd1d816a7a7c42727385a26227a17de298a8c0 /mail-filter
parentStable on ppc64. (diff)
downloadhistorical-da86c6d87097a9bf63d641223aefd57167a0795a.tar.gz
historical-da86c6d87097a9bf63d641223aefd57167a0795a.tar.bz2
historical-da86c6d87097a9bf63d641223aefd57167a0795a.zip
Improve socket permission setting - wait until socket is effectively created and then set the perms. Patch by Arnaud Launay <asl at launay.org>, bug #100733.
Package-Manager: portage-2.0.53_rc7
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/postgrey/ChangeLog10
-rw-r--r--mail-filter/postgrey/Manifest11
-rw-r--r--mail-filter/postgrey/files/digest-postgrey-1.21-r21
-rw-r--r--mail-filter/postgrey/files/postgrey.rc.new-r277
-rw-r--r--mail-filter/postgrey/postgrey-1.21-r2.ebuild74
5 files changed, 168 insertions, 5 deletions
diff --git a/mail-filter/postgrey/ChangeLog b/mail-filter/postgrey/ChangeLog
index 252d22841a31..2697a9873860 100644
--- a/mail-filter/postgrey/ChangeLog
+++ b/mail-filter/postgrey/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for mail-filter/postgrey
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/postgrey/ChangeLog,v 1.12 2005/10/24 14:37:26 ticho Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/postgrey/ChangeLog,v 1.13 2005/11/03 22:38:03 ticho Exp $
+
+*postgrey-1.21-r2 (03 Nov 2005)
+
+ 03 Nov 2005; Andrej Kacian <ticho@gentoo.org> +files/postgrey.rc.new-r2,
+ +postgrey-1.21-r2.ebuild:
+ Improve socket permission setting - wait until socket is effectively created
+ and then set the perms. Patch by Arnaud Launay <asl at launay.org>, bug
+ #100733.
24 Oct 2005; Andrej Kacian <ticho@gentoo.org> postgrey-1.21-r1.ebuild:
Stable on x86.
diff --git a/mail-filter/postgrey/Manifest b/mail-filter/postgrey/Manifest
index a7f46e3d4e93..6cce32900a34 100644
--- a/mail-filter/postgrey/Manifest
+++ b/mail-filter/postgrey/Manifest
@@ -1,20 +1,23 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 e372b4214c22c8b647cb918cc4e8d2b5 ChangeLog 2061
+MD5 d723040af55d439b40b6efdd84742504 ChangeLog 2362
MD5 2197c50ab163af184389dbf781d6bc21 files/digest-postgrey-1.21 64
MD5 2197c50ab163af184389dbf781d6bc21 files/digest-postgrey-1.21-r1 64
+MD5 2197c50ab163af184389dbf781d6bc21 files/digest-postgrey-1.21-r2 64
MD5 be9aa0c5ab50b82e7eb5c465e78abfb6 files/postgrey.conf 2057
MD5 6dfb29bdf769bd95b3da9611e89e9e67 files/postgrey.conf.new 1882
MD5 92755b7ca1258447038718aa283825d9 files/postgrey.rc 1906
MD5 574606b16ba42a5ed86921c12fdac7f5 files/postgrey.rc.new 1910
+MD5 658e1b1fbd690aa27418992e73b5360f files/postgrey.rc.new-r2 1984
MD5 97640b63104544cebd37ca40384a056b metadata.xml 304
MD5 ded0bdfcc4401588bac6bd30c5b5054c postgrey-1.21-r1.ebuild 2105
+MD5 82277ee3e32aa6cdaba5b91d7fc2d43f postgrey-1.21-r2.ebuild 2109
MD5 b1e7b37dc0abff9d55d28d59dc7f0f7e postgrey-1.21.ebuild 1919
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-iD8DBQFDXPHCQlM6RnzZP+IRAssZAKC7DVw7n/c4y3pSYhwBwc847moi+wCgwndw
-V3CElmfeBXHioMKEUa1KH+M=
-=dCxJ
+iD8DBQFDapFZQlM6RnzZP+IRAmkrAJ4m+dKPi9n1O1cFf4NJqvr5HqtvbACeKW6f
+FhH1+pucwA2zUL27EG0w+jo=
+=Zio+
-----END PGP SIGNATURE-----
diff --git a/mail-filter/postgrey/files/digest-postgrey-1.21-r2 b/mail-filter/postgrey/files/digest-postgrey-1.21-r2
new file mode 100644
index 000000000000..7ecd83a4b1e7
--- /dev/null
+++ b/mail-filter/postgrey/files/digest-postgrey-1.21-r2
@@ -0,0 +1 @@
+MD5 1274e073be5178445e0892a9dcc6fe98 postgrey-1.21.tar.gz 25934
diff --git a/mail-filter/postgrey/files/postgrey.rc.new-r2 b/mail-filter/postgrey/files/postgrey.rc.new-r2
new file mode 100644
index 000000000000..7eafd3a47cb5
--- /dev/null
+++ b/mail-filter/postgrey/files/postgrey.rc.new-r2
@@ -0,0 +1,77 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/postgrey/files/postgrey.rc.new-r2,v 1.1 2005/11/03 22:38:03 ticho Exp $
+
+conf="/etc/conf.d/postgrey"
+
+depend() {
+ need net
+ before postfix
+ provide postfix_greylist
+}
+
+conf_error() {
+ eerror "You need to setup ${conf} first"
+ return 1
+}
+
+checkconfig() {
+if [ -z "${POSTGREY_TYPE}" ]
+ then
+ einfo "You need to choose the server type you want"
+ einfo "by setting the POSTGREY_TYPE variable in ${conf}."
+ else
+ if [ "x${POSTGREY_TYPE}" = "xinet" ]
+ then
+ if [ -z "${POSTGREY_PORT}" ] || [ -z "${POSTGREY_HOST}" ]
+ then
+ einfo "The following entries are missing in ${conf}:"
+ [ -z "${POSTGREY_HOST}" ] && einfo " - POSTGREY_HOST"
+ [ -z "${POSTGREY_PORT}" ] && einfo " - POSTGREY_PORT"
+ conf_error
+ fi
+ POSTGREY_ADDR="${POSTGREY_TYPE}=${POSTGREY_HOST}:${POSTGREY_PORT}"
+ else
+ if [ -z "${POSTGREY_SOCKET}" ]
+ then
+ einfo "The following entries are missing in ${conf}:"
+ [ -z "${POSTGREY_SOCKET}" ] && einfo " - POSTGREY_SOCKET"
+ conf_error
+ fi
+ POSTGREY_ADDR="${POSTGREY_TYPE}=${POSTGREY_SOCKET}"
+ fi
+fi
+
+ if [ -z "${POSTGREY_PID}" ]
+ then
+ einfo "The following entries are missing in ${conf}:"
+ [ -z "${POSTGREY_PID}" ] && einfo " - POSTGREY_PID"
+ conf_error
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting Postgrey"
+
+ # HACK -- start a subshell and corrects perms on the socket...
+ ( if [ "x${POSTGREY_TYPE}" = "xunix" ]; then
+ rm -f ${POSTGREY_SOCKET};
+ while ! test -S ${POSTGREY_SOCKET}; do sleep 1; done;
+ chmod a+rw,a-x ${POSTGREY_SOCKET}; fi ) &
+
+ start-stop-daemon --start --quiet --background \
+ --exec /usr/sbin/postgrey -- \
+ --${POSTGREY_ADDR} \
+ --daemonize \
+ --pidfile=${POSTGREY_PID} \
+ ${POSTGREY_OPTS}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping Postgrey"
+ start-stop-daemon --stop --quiet --pidfile ${POSTGREY_PID}
+ eend ${?}
+}
diff --git a/mail-filter/postgrey/postgrey-1.21-r2.ebuild b/mail-filter/postgrey/postgrey-1.21-r2.ebuild
new file mode 100644
index 000000000000..72713a5aa1ca
--- /dev/null
+++ b/mail-filter/postgrey/postgrey-1.21-r2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/postgrey/postgrey-1.21-r2.ebuild,v 1.1 2005/11/03 22:38:03 ticho Exp $
+
+inherit eutils
+
+DESCRIPTION="Postgrey is a Postfix policy server implementing greylisting"
+SRC_URI="http://isg.ee.ethz.ch/tools/${PN}/pub/${P}.tar.gz
+ http://isg.ee.ethz.ch/tools/${PN}/pub/old/${P}.tar.gz"
+HOMEPAGE="http://isg.ee.ethz.ch/tools/postgrey/"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+DEPEND=""
+RDEPEND=">=dev-lang/perl-5.6.0
+ dev-perl/net-server
+ dev-perl/IO-Multiplex
+ dev-perl/BerkeleyDB
+ dev-perl/Net-DNS
+ >=sys-libs/db-4.1
+ >=mail-mta/postfix-2.1.0"
+
+KEYWORDS="~alpha ~amd64 ~x86"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /dev/null ${PN}
+}
+
+src_install () {
+ cd ${S}
+
+ # postgrey data/DB in /var
+ diropts -m0770 -o ${PN} -g ${PN}
+ dodir /var/spool/postfix/${PN}
+ keepdir /var/spool/postfix/${PN}
+ fowners postgrey:postgrey /var/spool/postfix/${PN}
+ fperms 0770 /var/spool/postfix/${PN}
+
+ # postgrey binary
+ dosbin ${PN}
+ dosbin contrib/postgreyreport
+
+ # postgrey data in /etc/postfix
+ insinto /etc/postfix
+ insopts -o root -g ${PN} -m 0640
+ doins postgrey_whitelist_clients postgrey_whitelist_recipients
+
+ # documentation
+ dodoc Changes README
+
+ # init.d + conf.d files
+ newinitd ${FILESDIR}/${PN}.rc.new-r2 ${PN}
+ newconfd ${FILESDIR}/${PN}.conf.new ${PN}
+}
+
+pkg_postinst() {
+ echo
+ einfo "To make use of greylisting, please update your postfix config:"
+ einfo
+
+ einfo "In order to start using postgrey, edit /etc/conf.d/postgrey, add following lines"
+ einfo "to smtpd_recipient restrictions setting in your /etc/postfix/main.cf:"
+ einfo "\t\"check_policy_service inet:127.0.0.1:10030\", if you're using TCP socket"
+ einfo "\t\"check_policy_service unix:private/postgrey\", if you're using UNIX socket"
+ einfo "Then, start postgrey and restart postfix."
+
+ einfo "Also remember to make the daemon start durig system boot:"
+ einfo " rc-update add postgrey default"
+ echo
+ ewarn "Read postgrey documentation for more info (perldoc postgrey)."
+ echo
+ epause 5
+}