]> Pileus Git - ~andy/sunrise/blob - mail-filter/postwhite/postwhite-0.1.3.ebuild
dev-python/repoze-lru: Drop repoze-lru: in main tree
[~andy/sunrise] / mail-filter / postwhite / postwhite-0.1.3.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils
6
7 DESCRIPTION="Per-recipient whitelist policy server for Postfix MTA managed entirely by emails"
8 HOMEPAGE="http://www.bitcetera.com/products/postwhite"
9 SRC_URI="http://www.bitcetera.com/page_attachments/0000/0014/${P}.tgz"
10
11 LICENSE="GPL-3"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE=""
15
16 DEPEND="mail-mta/postfix
17         >=dev-lang/ruby-1.8.6
18         dev-ruby/rubygems
19         >=dev-ruby/facets-2.8.4-r1
20         dev-ruby/trollop"
21 RDEPEND="${DEPEND}"
22
23 S=${WORKDIR}
24
25 src_install() {
26         dosbin ${PN} || die "installing binary failed"
27         newinitd "${FILESDIR}"/0.1.0/${PN}.init ${PN} || die
28         newconfd "${FILESDIR}"/0.1.0/${PN}.conf ${PN} || die
29         "${S}"/${PN} --prefix "${D}" configure || die
30         keepdir /etc/postfix/postwhite
31 }
32
33 pkg_preinst() {
34         enewgroup ${PN}
35         enewuser ${PN} -1 -1 /dev/null ${PN}
36 }
37
38 pkg_postinst() {
39         elog "The following steps are necessary to hook Postwhite into the Postfix"
40         elog "workflow:"
41         elog
42         elog "1) List all email addresses that should be protected by Postwhite in:"
43         elog "   /etc/postfix/postwhite/recipients.yml"
44         elog "2) Start the Postwhite daemon:"
45         elog "   /etc/init.d/postwhite start"
46         elog "3) Add the line 'check_policy_service inet:127.0.0.1:10035,' to the"
47         elog "   'smtpd_recipient_restrictions' block which you find somewhere in"
48         elog "   /etc/postfix/main.cf. You should place it near the end of the block"
49         elog "   after all basic services (like 'reject_unauth_destination,') and"
50         elog "   the greylist service (like Postgrey) but before the anti-SPAM services"
51         elog "   (like DSPAM or SpamAssassin) in order to prevent unnecessary workload."
52         elog "4) Reload Postfix to bring your changes into effect:"
53         elog "   /etc/init.d/postfix reload"
54         elog "5) Make the Postwhite daemon start at boot time:"
55         elog "   rc-update add postwhite default"
56 }