summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2010-07-05 16:41:13 +0000
committerMichał Górny <mgorny@gentoo.org>2010-07-05 16:41:13 +0000
commit6065580ec81ce7a56ae4253198e701f1ae5aff70 (patch)
tree9f5bc1cc2d08689a83c48dae5dce8d6f3cb08f3f /mail-filter/postwhite/postwhite-0.1.3.ebuild
parentdev-lang/syx: Version bump, cleanup, added missing DEPEND. (diff)
downloadsunrise-6065580ec81ce7a56ae4253198e701f1ae5aff70.tar.gz
sunrise-6065580ec81ce7a56ae4253198e701f1ae5aff70.tar.bz2
sunrise-6065580ec81ce7a56ae4253198e701f1ae5aff70.zip
mail-filter/postwhite: Version bump, cleanup and moved the user/group creation to pkg_preinst() as they are not required during build-time.
svn path=/sunrise/; revision=10904
Diffstat (limited to 'mail-filter/postwhite/postwhite-0.1.3.ebuild')
-rw-r--r--mail-filter/postwhite/postwhite-0.1.3.ebuild56
1 files changed, 56 insertions, 0 deletions
diff --git a/mail-filter/postwhite/postwhite-0.1.3.ebuild b/mail-filter/postwhite/postwhite-0.1.3.ebuild
new file mode 100644
index 000000000..a12a810a8
--- /dev/null
+++ b/mail-filter/postwhite/postwhite-0.1.3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils
+
+DESCRIPTION="Per-recipient whitelist policy server for Postfix MTA managed entirely by emails"
+HOMEPAGE="http://www.bitcetera.com/products/postwhite"
+SRC_URI="http://www.bitcetera.com/page_attachments/0000/0014/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="mail-mta/postfix
+ >=dev-lang/ruby-1.8.6
+ dev-ruby/rubygems
+ >=dev-ruby/facets-2.8.4-r1
+ dev-ruby/trollop"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+src_install() {
+ dosbin ${PN} || die "installing binary failed"
+ newinitd "${FILESDIR}"/0.1.0/${PN}.init ${PN} || die
+ newconfd "${FILESDIR}"/0.1.0/${PN}.conf ${PN} || die
+ "${S}"/${PN} --prefix "${D}" configure || die
+ keepdir /etc/postfix/postwhite
+}
+
+pkg_preinst() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /dev/null ${PN}
+}
+
+pkg_postinst() {
+ elog "The following steps are necessary to hook Postwhite into the Postfix"
+ elog "workflow:"
+ elog
+ elog "1) List all email addresses that should be protected by Postwhite in:"
+ elog " /etc/postfix/postwhite/recipients.yml"
+ elog "2) Start the Postwhite daemon:"
+ elog " /etc/init.d/postwhite start"
+ elog "3) Add the line 'check_policy_service inet:127.0.0.1:10035,' to the"
+ elog " 'smtpd_recipient_restrictions' block which you find somewhere in"
+ elog " /etc/postfix/main.cf. You should place it near the end of the block"
+ elog " after all basic services (like 'reject_unauth_destination,') and"
+ elog " the greylist service (like Postgrey) but before the anti-SPAM services"
+ elog " (like DSPAM or SpamAssassin) in order to prevent unnecessary workload."
+ elog "4) Reload Postfix to bring your changes into effect:"
+ elog " /etc/init.d/postfix reload"
+ elog "5) Make the Postwhite daemon start at boot time:"
+ elog " rc-update add postwhite default"
+}