1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 DESCRIPTION="A mail storage and retrieval daemon that uses MySQL or PostgreSQL as its data store"
8 HOMEPAGE="http://www.dbmail.org/"
9 SRC_URI="http://www.dbmail.org/download/2.2/${P}.tar.gz"
14 IUSE="ldap mysql postgres sieve sqlite3 ssl static"
16 DEPEND="ssl? ( dev-libs/openssl )
17 postgres? ( >=dev-db/postgresql-7.4 )
18 mysql? ( >=virtual/mysql-4.1 )
19 sqlite3? ( >=dev-db/sqlite-3.0 )
20 sieve? ( >=mail-filter/libsieve-2.2.1 )
29 enewuser dbmail -1 -1 /var/lib/dbmail dbmail
36 epatch "${FILESDIR}/${P}-removeversion.patch"
37 epatch "${FILESDIR}/${P}-messages.patch"
41 use sqlite3 && myconf="--with-sqlite"
42 use ldap && myconf=${myconf}" --with-auth-ldap"
45 --sysconfdir=/etc/dbmail \
47 $(use_enable static) \
50 $(use_with postgres) \
51 $(use_with mysql) || die "econf failed"
52 emake || die "emake failed"
56 emake DESTDIR="${D}" install || die "emake install failed"
58 dodoc AUTHORS BUGS UPGRADING ChangeLog README* INSTALL* NEWS THANKS
60 dodoc sql/postgresql/*
63 sed -i -e "s:nobody:dbmail:" dbmail.conf
64 sed -i -e "s:nogroup:dbmail:" dbmail.conf
66 newins dbmail.conf dbmail.conf.dist
68 newinitd "${FILESDIR}"/dbmail-imapd.initd dbmail-imapd
69 newinitd "${FILESDIR}"/dbmail-lmtpd.initd dbmail-lmtpd
70 newinitd "${FILESDIR}"/dbmail-pop3d.initd dbmail-pop3d
71 use sieve && newinitd "${FILESDIR}"/dbmail-timsieved.initd dbmail-timsieved
73 dobin contrib/mailbox2dbmail/mailbox2dbmail
74 doman contrib/mailbox2dbmail/mailbox2dbmail.1
76 keepdir /var/lib/dbmail
77 fperms 750 /var/lib/dbmail
82 elog "If you update from 2.1.7 please apply 2_1_7-2_2_0.<YOUR_DB>.gz"
83 elog "to your dbmail database and run dbmail-util -by ."
85 elog "Please read /usr/share/doc/${PF}/INSTALL.gz"
86 elog "for remaining instructions on setting up dbmail users and "
87 elog "for finishing configuration to connect to your MTA and "
88 elog "to connect to your db."
90 elog "Database schemes can be found in /usr/share/doc/${PF}/"
91 elog "You will also want to follow the installation instructions"
92 elog "on setting up the maintenance program to delete old messages."
93 elog "Don't forget to edit /etc/dbmail/dbmail.conf as well. :)"
94 elog ">>> --- For maintenance ---"
95 elog ">>> add this to crontab: 0 3 * * * /usr/bin/dbmail-util -cpdy >/dev/null 2>&1 "