]> Pileus Git - ~andy/sunrise/blob - mail-filter/postwhite/postwhite-0.1.0.ebuild
sunrise/ app-portage/elog-list/elog-list-0.0.6.ebuild: Update headers for 2010
[~andy/sunrise] / mail-filter / postwhite / postwhite-0.1.0.ebuild
1 # Copyright 1999-2010 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/download/${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
20         dev-ruby/trollop"
21 RDEPEND=${DEPEND}
22
23 pkg_setup() {
24         enewgroup ${PN}
25         enewuser ${PN} -1 -1 /dev/null ${PN}
26 }
27
28 src_install() {
29         dosbin ${PN} || die "installing binary failed"
30         newinitd "${FILESDIR}"/${PVR}/${PN}.init ${PN}
31         newconfd "${FILESDIR}"/${PVR}/${PN}.conf ${PN}
32         "${S}"/${PN} --prefix "${D}" configure || die
33         keepdir /etc/postfix/postwhite
34 }
35
36 pkg_postinst() {
37         elog
38         elog "The following steps are necessary to hook Postwhite into the Postfix"
39         elog "workflow:"
40         elog
41         elog "1) List all email addresses that should be protected by Postwhite in:"
42         elog "   /etc/postfix/postwhite/recipients.yml"
43         elog "2) Start the Postwhite daemon:"
44         elog "   /etc/init.d/postwhite start"
45         elog "3) Add the line 'check_policy_service inet:127.0.0.1:10035,' to the"
46         elog "   'smtpd_recipient_restrictions' block which you find somewhere in"
47         elog "   /etc/postfix/main.cf. You should place it near the end of the block"
48         elog "   after all basic services (like 'reject_unauth_destination,') and"
49         elog "   the greylist service (like Postgrey) but before the anti-SPAM services"
50         elog "   (like DSPAM or SpamAssassin) in order to prevent unnecessary workload."
51         elog "4) Reload Postfix to bring your changes into effect:"
52         elog "   /etc/init.d/postfix reload"
53         elog "5) Make the Postwhite daemon start at boot time:"
54         elog "   rc-update add postwhite default"
55         elog
56         epause 5
57 }