]> Pileus Git - ~andy/sunrise/commitdiff
mail-filter/postwhite: New ebuild mail-filter/postwhite for bug 232647
authorSven Schwyn (svoop) <gentoo@bitcetera.com>
Wed, 23 Jul 2008 07:59:32 +0000 (07:59 +0000)
committerSven Schwyn (svoop) <gentoo@bitcetera.com>
Wed, 23 Jul 2008 07:59:32 +0000 (07:59 +0000)
svn path=/sunrise/; revision=6556

mail-filter/postwhite/ChangeLog [new file with mode: 0644]
mail-filter/postwhite/Manifest [new file with mode: 0644]
mail-filter/postwhite/files/0.1.0/postwhite.conf [new file with mode: 0644]
mail-filter/postwhite/files/0.1.0/postwhite.init [new file with mode: 0644]
mail-filter/postwhite/metadata.xml [new file with mode: 0644]
mail-filter/postwhite/postwhite-0.1.0.ebuild [new file with mode: 0644]

diff --git a/mail-filter/postwhite/ChangeLog b/mail-filter/postwhite/ChangeLog
new file mode 100644 (file)
index 0000000..9e9a1a7
--- /dev/null
@@ -0,0 +1,9 @@
+# ChangeLog for mail-filter/postwhite
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+  23 Jul 2008; Sven Schwyn (svoop) <gentoo@bitcetera.com> +files/0.1.0,
+  +postwhite-0.1.0.ebuild, +files/0.1.0/postwhite.conf,
+  +files/0.1.0/postwhite.init, +metadata.xml:
+  New ebuild mail-filter/postwhite for bug 232647
+
diff --git a/mail-filter/postwhite/Manifest b/mail-filter/postwhite/Manifest
new file mode 100644 (file)
index 0000000..5fe5f03
--- /dev/null
@@ -0,0 +1,6 @@
+AUX 0.1.0/postwhite.conf 119 RMD160 a7edeaf643b9959aed15d08d115b9bb08a70e40d SHA1 bc4d3fb0519dae0a83365886be97bb96e6889c9d SHA256 1f76c3b215380ebb10c43937d396ea4eb64493edd2da4fb314bb04c168a9f0b5
+AUX 0.1.0/postwhite.init 381 RMD160 4c88654798df114b4f06f473d8e95370974bf1df SHA1 d53272e643aa4cbea5a502e4f2403ef80f236d04 SHA256 71b7d5802f8fc3744f0a617621b8fa2b00921d7ff33d6e2d0dd280eef5a785fe
+DIST postwhite-0.1.0.tgz 6513 RMD160 7e220106fa4e0d9914c450d0945b20eb7ead04f4 SHA1 b94325f12f8b0977f713c0d00884a3b757861552 SHA256 4f4884f1917933924c7fb771375637e3f908f80e8df2e3558666fe1aa3ba4c6e
+EBUILD postwhite-0.1.0.ebuild 1827 RMD160 e5fb2159f51ccc4d65f348619d21278ef9e5ad49 SHA1 6fda4d5c2156c5ff2e94ee4db2dc1a1c1e5d0164 SHA256 42991dd76984e5465a2bd9534e2643fc3fe57aaf9a5e804d4ace22bf8be35e0d
+MISC ChangeLog 347 RMD160 5d6ce7286416b81f3a0d9d26e9dea05f7e11f293 SHA1 215b62b23ce3d6cd891a9de7a80ad92eef1dbfa0 SHA256 43b38b4c15fcc727f3f0492a3450c45bbffb835e341c0a61e34fe767501e453e
+MISC metadata.xml 1695 RMD160 14735524d7b9105a201d8336ad60517dd1a993f3 SHA1 3ad1537abf72dbe1dfc9d0f875586b0b38cc3352 SHA256 99dfb76e233effbd6b1ed887d7f00d39daacb27374139fd1f24ea94e5b8be427
diff --git a/mail-filter/postwhite/files/0.1.0/postwhite.conf b/mail-filter/postwhite/files/0.1.0/postwhite.conf
new file mode 100644 (file)
index 0000000..4f67629
--- /dev/null
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/postwhite
+
+# See "postwhite --help" for a list of available options.
+#
+POSTWHITE_OPTS=""
diff --git a/mail-filter/postwhite/files/0.1.0/postwhite.init b/mail-filter/postwhite/files/0.1.0/postwhite.init
new file mode 100644 (file)
index 0000000..e2261c4
--- /dev/null
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+       need net
+       before postfix
+}
+
+start() {
+       ebegin "Starting Postwhite"
+       /usr/sbin/postwhite --quiet --detach ${POSTWHITE_OPTS} start 
+       eend ${?}
+}
+
+stop() {
+       ebegin "Stopping Postwhite"
+       /usr/sbin/postwhite --quiet stop        
+       eend ${?}
+}
diff --git a/mail-filter/postwhite/metadata.xml b/mail-filter/postwhite/metadata.xml
new file mode 100644 (file)
index 0000000..e4ba875
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <herd>maintainer-wanted</herd>
+       <maintainer>
+               <email>gentoo@bitcetera.com</email>
+               <name>Sven Schwyn</name>
+       </maintainer>
+       <longdescription lang="en">
+               Postwhite is a policy server for Postfix MTA which filters incoming emails
+               based on per recipient whitelists managed by an email frontend.
+               
+               Incoming emails are denied unless the sender address or sender domain is 
+               present on the recipient's whitelist. This concept is neither new nor fancy
+               in itself, but the way Postwhite lets you manage your whitelist sure is.
+
+               Here is a real life example:
+
+               Arthur's main email address arthur@dent.tld is great for everyday
+               use, but he doesn't want to pollute it by using it for mailing lists,
+               websites, online shopping and such. Postwhite to the rescue! Arthur creates 
+               a virtual email address hitchhike@dent.tld which is delivered to 
+               the same mailbox. He adds this address to recipients.yml and then
+               restarts Postwhite.
+
+               Initially, all incoming emails will be denied, so when Arthur decides to 
+               join the Betelgeuse mailing list, his whitelist has to learn about this. 
+               Arthur sends an empty email to hitchhike+learn@dent.tld which
+               puts Postwhite into learning mode for a limited period of time. In learning
+               mode, Postwhite allows and delivers any incoming mails, yet it
+               delivers a followup notification message along with it. When the first 
+               email from the Betelgeuse mailing list comes in, Arthur simply replies to 
+               the corresponding notification message thus adding Betelgeuse to the 
+               whitelist.
+       </longdescription>
+</pkgmetadata>
diff --git a/mail-filter/postwhite/postwhite-0.1.0.ebuild b/mail-filter/postwhite/postwhite-0.1.0.ebuild
new file mode 100644 (file)
index 0000000..c98f1f9
--- /dev/null
@@ -0,0 +1,56 @@
+# Copyright 1999-2008 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/download/${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
+       dev-ruby/trollop"
+
+pkg_setup() {
+       enewgroup ${PN}
+       enewuser ${PN} -1 -1 /dev/null ${PN}
+}
+
+src_install() {
+       dosbin ${PN} || die "installing binary failed"
+       newinitd "${FILESDIR}"/${PVR}/${PN}.init ${PN}
+       newconfd "${FILESDIR}"/${PVR}/${PN}.conf ${PN}
+       "${S}"/${PN} --prefix "${D}" configure
+       keepdir /etc/postfix/postwhite
+}
+
+pkg_postinst() {
+       elog
+       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"
+       elog
+       epause 5
+}