summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-mail/dovecot/ChangeLog8
-rw-r--r--net-mail/dovecot/Manifest4
-rw-r--r--net-mail/dovecot/dovecot-1.1.6-r1.ebuild252
-rw-r--r--net-mail/dovecot/files/dovecot.init-r257
4 files changed, 319 insertions, 2 deletions
diff --git a/net-mail/dovecot/ChangeLog b/net-mail/dovecot/ChangeLog
index 961497f4dada..b7c2a2a4859f 100644
--- a/net-mail/dovecot/ChangeLog
+++ b/net-mail/dovecot/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-mail/dovecot
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.186 2008/11/02 10:33:51 dertobi123 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.187 2008/11/03 17:22:59 wschlich Exp $
+
+*dovecot-1.1.6-r1 (03 Nov 2008)
+
+ 03 Nov 2008; Wolfram Schlich <wschlich@gentoo.org> +files/dovecot.init-r2,
+ +dovecot-1.1.6-r1.ebuild:
+ fix bugs #245287 and #245316
02 Nov 2008; Tobias Scherbaum <dertobi123@gentoo.org>
dovecot-1.1.6.ebuild:
diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest
index d42a70d2eaea..441a169f8325 100644
--- a/net-mail/dovecot/Manifest
+++ b/net-mail/dovecot/Manifest
@@ -1,6 +1,7 @@
AUX dovecot-1.1.4-expire.patch 1203 RMD160 a27bd308495108bc0078c4fc79245604da5ae90a SHA1 9f1b949ab5283d67fd6b965253a293e1a6fac4d5 SHA256 6ff8c3e0e8856c5b058ac36018d65ea9ee02657c0ea00d0a70a6601b520142ed
AUX dovecot.init 874 RMD160 aa899b69d42946dcf2262c38731319474e759041 SHA1 4f0a95cf6ba9e86bd9008694ea927dc97703b24d SHA256 145d68382d757110aa86f58b2567fb25648fa0ca62788e3461f2b45fc5999c80
AUX dovecot.init-r1 1670 RMD160 1c147fe3780adcee11009695adc8e10ee5a33100 SHA1 ee708766e5657b8cfce7b4fc02305506d9cff049 SHA256 bdd58f6466fdb0cd98f46ac8493cc73f80c3e13a15283e3dc267707717d17412
+AUX dovecot.init-r2 1695 RMD160 5d4fa8f8929462f526a9bfdd1138249a8df62cff SHA1 5d519afd9891e624fb33d15508f3c55c02b9a9ba SHA256 75a103bdb45cd315073c2a653c1b520cc69d6a71d04493009d5815d0dce5c3f0
DIST dovecot-1.0.15-MANAGESIEVE-v9.3.diff.gz 105361 RMD160 30cba9148d657cc986e2f119197f9c38736d35a2 SHA1 c80c999ba4c8a193c6f9fc59d339eb9898b24171 SHA256 6dcee66e753ce07f8c953900f9ea72904ffd02c0b742dc6450e6a7f1d72d75d6
DIST dovecot-1.0.15.tar.gz 1783347 RMD160 d882e3dbed60cbcbacdcb6023d0c12213a0d35ac SHA1 4e1f40e37461f848459df9dde809097fef46c376 SHA256 2b4d8720d5f5868d57df294350ee0f5a8d2723e9937dab1eea2084478ace9597
DIST dovecot-1.1-managesieve-0.10.3.tar.gz 395123 RMD160 bc8cc1be276d15d574e6a49ee4de67504b159399 SHA1 3f4764da34e7416cd280a6ab801e2a20b970b30c SHA256 ac70ee48cdec2d472c14cb93bc9f3339a30763e418a579ddea0b9b18befac5ac
@@ -12,6 +13,7 @@ DIST dovecot-sieve-1.0.3.tar.gz 455806 RMD160 b575a1181fb2389a47db4cdd2815a47a2f
DIST dovecot-sieve-1.1.5.tar.gz 468913 RMD160 825a8ec07d49527d8551cb5f3f86b638fddbafbd SHA1 672adf0a2f1627d96f97fc63fecaf024dd9f7a42 SHA256 ec1ea94311d5fb6cb5dd7e451728784afb39521a6a580f640b4d2115505a5ddf
EBUILD dovecot-1.0.15-r1.ebuild 7351 RMD160 cdd0b0b9b824aa1262a0c254410e8f7865fc4d6d SHA1 19c95d9f7a2a9a2c89013e553ce7d536ab227073 SHA256 4a8231ee4099306ccd7a095608a2b483f9fad440f13afec7bb7ec8dd2c4346f7
EBUILD dovecot-1.1.4-r1.ebuild 8010 RMD160 c01c7452d28fbe5d5dc8826bc705bc1eefeef2cd SHA1 378c5c715177fdcef7d8c76a4e1fb2d76aa4a4c4 SHA256 93956a4240deb10d9d4573c6837fedc91c7a1645481fd734dd9ac6743b2de77e
+EBUILD dovecot-1.1.6-r1.ebuild 8028 RMD160 fe04cc7f4e3d2be501524acad10feeb10553e6c6 SHA1 a30036720f9b97c8bd5210fe5842647a0d0e12ff SHA256 c8c892857cfb9ec099b0884bd64fc67675a49f58af750df1da224c769f32e252
EBUILD dovecot-1.1.6.ebuild 7972 RMD160 ea3c17e2539eace86f6522dea039e32f01ca4575 SHA1 cb2a416aa75adcdc9b785226f8c1d15419a6acf2 SHA256 18fd5747001a92d96b949d84af02316a5fb3cda985fa14e5377956ef605fb5c2
-MISC ChangeLog 30305 RMD160 39d0e9ac032f74c5f18fc3731bb1d9e7ac8593e7 SHA1 238eb0a3d0d1483a94403abf523358a2bb1eb782 SHA256 691d6677852934513ea45735f776651aeb602998b9c7e5295cf1543221398642
+MISC ChangeLog 30473 RMD160 7c5c281be83abf2b4552534f59318c20a69ec953 SHA1 7a26d3494308797e881b41594acf3324a0164bcc SHA256 c3e0ba8408d4e8c72b8e2f98ca520867dabcac54c2683fcf32d6d58605ce108a
MISC metadata.xml 560 RMD160 1d9909ba298f97ddfedc7c37a9a74a8a00f0fc98 SHA1 062f2369f4349513f9e8167b6c781e50c62b95d0 SHA256 2cce3170119fffd0c9e8403f57cee03c128ca1e1d58950f087ced22b04ba75c8
diff --git a/net-mail/dovecot/dovecot-1.1.6-r1.ebuild b/net-mail/dovecot/dovecot-1.1.6-r1.ebuild
new file mode 100644
index 000000000000..7cb45fe451d0
--- /dev/null
+++ b/net-mail/dovecot/dovecot-1.1.6-r1.ebuild
@@ -0,0 +1,252 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.1.6-r1.ebuild,v 1.1 2008/11/03 17:22:59 wschlich Exp $
+
+inherit autotools eutils ssl-cert versionator
+
+MY_P="${P/_/.}"
+MY_PV12=$(get_version_component_range 1-2 ${PV})
+S="${WORKDIR}/${MY_P}"
+SIEVE="dovecot-sieve-1.1.5"
+SIEVE_S="${WORKDIR}/${SIEVE}"
+MANAGESIEVE_PATCH="managesieve-0.10.3"
+MANAGESIEVE="managesieve-0.10.3"
+MANAGESIEVE_S="${WORKDIR}/${PN}-${MY_PV12}-${MANAGESIEVE}"
+
+SRC_URI="http://dovecot.org/releases/${MY_PV12}/${MY_P}.tar.gz
+sieve? ( http://dovecot.org/releases/sieve/${SIEVE}.tar.gz )
+managesieve? ( http://www.rename-it.nl/${PN}/${MY_PV12}/${MY_P}-${MANAGESIEVE_PATCH}.diff.gz
+http://www.rename-it.nl/${PN}/${MY_PV12}/${PN}-${MY_PV12}-${MANAGESIEVE}.tar.gz )"
+
+DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
+HOMEPAGE="http://www.dovecot.org/"
+
+SLOT="0"
+LICENSE="LGPL-2.1"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
+
+IUSE="debug doc ipv6 kerberos ldap managesieve mbox mysql pop3d pam postgres sieve sqlite3 ssl suid vpopmail"
+
+# Developer documentation, controlled by the doc USE flag
+DEVDOCS="auth-protocol index multiaccess securecoding"
+
+DEPEND=">=sys-apps/sed-4
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ pam? ( virtual/pam )
+ ssl? ( dev-libs/openssl )
+ postgres? ( virtual/postgresql-base )
+ mysql? ( virtual/mysql )
+ sqlite3? ( =dev-db/sqlite-3* )
+ vpopmail? ( net-mail/vpopmail )"
+
+RDEPEND="${DEPEND}
+ >=net-mail/mailbase-0.00-r8"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ if use managesieve; then
+ epatch "${WORKDIR}"/${MY_P}-${MANAGESIEVE_PATCH}.diff
+ eautoreconf
+ fi
+}
+
+pkg_setup() {
+ if ! use sieve && use managesieve; then
+ eerror "managesieve USE flag selected but sieve USE flag unselected"
+ die "USE flag problem"
+ fi
+ # Add user and group for login process (same as for fedora/redhat)
+ enewgroup dovecot 97
+ enewuser dovecot 97 -1 /dev/null dovecot
+}
+
+src_compile() {
+ local myconf=
+ use ssl && myconf="${myconf} --with-ssl=openssl" \
+ || myconf="${myconf} --without-ssl"
+ econf \
+ --localstatedir=/var \
+ --sysconfdir=/etc/dovecot \
+ --enable-header-install \
+ --with-ioloop=best \
+ --with-poll=best \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_with kerberos gssapi) \
+ $(use_with ldap) \
+ $(use_with mysql) \
+ $(use_with pam) \
+ $(use_with pop3d) \
+ $(use_with postgres pgsql) \
+ $(use_with sqlite3 sqlite) \
+ $(use_with vpopmail) \
+ ${myconf} \
+ || die "configure failed"
+ emake || die "make failed"
+
+ if use sieve; then
+ einfo "Building sieve"
+ cd "${SIEVE_S}"
+ econf --with-dovecot="${S}" || die "configure failed (sieve)"
+ emake || die "make failed (sieve)"
+ fi
+
+ if use managesieve; then
+ einfo "Building managesieve"
+ cd "${MANAGESIEVE_S}"
+ econf --with-dovecot="${S}" --with-dovecot-sieve="${SIEVE_S}" \
+ || die "configure failed (managesieve)"
+ emake || die "make failed (managesieve)"
+ fi
+}
+
+src_install () {
+ make DESTDIR="${D}" install || die "make install failed"
+ use suid && fperms u+s /usr/libexec/dovecot/deliver
+
+ rm -f "${D}"/etc/dovecot/dovecot-{ldap,sql}-example.conf
+
+ newinitd "${FILESDIR}"/dovecot.init-r2 dovecot
+
+ # Documentation
+ rm -rf "${D}"/usr/share/doc/dovecot
+ dodoc AUTHORS NEWS README TODO dovecot-example.conf
+ use managesieve && newdoc ${MANAGESIEVE_S}/README README.managesieve
+ if use doc; then
+ dodoc doc/*.txt
+ else
+ local x= n=
+ for x in doc/*.txt; do
+ n=$(basename "${x}" .txt)
+ [[ " ${DEVDOCS} " != *" ${n} "* ]] && dodoc "${x}"
+ done
+ fi
+
+ # Create the dovecot.conf file from the dovecot-example.conf file that
+ # the dovecot folks nicely left for us....
+ local conf="${D}/etc/dovecot/dovecot.conf"
+ mv "${D}"/etc/dovecot/dovecot-example.conf "${D}"/etc/dovecot/dovecot.conf
+ fperms 600 /etc/dovecot/dovecot.conf # bug #245316
+
+ # .maildir is the Gentoo default, but we need to support mbox to
+ local mail_location="maildir:~/.maildir"
+ if use mbox; then
+ mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u"
+ keepdir /var/dovecot
+ sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' "${conf}"
+ fi
+ sed -i -e \
+ "s|#mail_location =|mail_location = ${mail_location}|" "${conf}" \
+ || die "failed to update mail location settings in dovecot.conf"
+
+ # We're using pam files (imap and pop3) provided by mailbase
+ if use pam; then
+ sed -i -e '/passdb pam/, /^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
+ "${conf}" || die "failed to update PAM settings in dovecot.conf"
+ # mailbase does not provide a managesieve pam file
+ use managesieve && dosym imap /etc/pam.d/managesieve
+ fi
+
+ # Listen on ipv6 and ipv4
+ if use ipv6; then
+ sed -i -e 's/^#listen = \*/listen = \[::\]/g' "${conf}" \
+ || die "failed to update listen settings in dovecot.conf"
+ fi
+
+ # Update ssl cert locations
+ if use ssl; then
+ sed -i -e 's,^#ssl_cert_file =.*,ssl_cert_file = /etc/ssl/dovecot/server.pem,' \
+ -e 's,^#ssl_key_file =.*,ssl_key_file = /etc/ssl/dovecot/server.key,' \
+ "${conf}" || die "failed to update SSL settings in dovecot.conf"
+ fi
+
+ # Install SQL configuration
+ if use mysql || use postgres; then
+ cp doc/dovecot-sql-example.conf "${D}"/etc/dovecot/dovecot-sql.conf
+ fperms 600 /etc/dovecot/dovecot-sql.conf
+ sed -i -e '/db sql/,/args/ s|=|= /etc/dovecot-sql.conf|' "${conf}" \
+ || die "failed to update SQL settings in dovecot-sql.conf"
+ dodoc doc/dovecot-sql-example.conf
+ fi
+
+ # Install LDAP configuration
+ if use ldap; then
+ cp doc/dovecot-ldap-example.conf "${D}"/etc/dovecot/dovecot-ldap.conf
+ fperms 600 /etc/dovecot/dovecot-ldap.conf
+ sed -i -e '/db ldap/,/args/ s|=|= /etc/dovecot-ldap.conf|' "${conf}" \
+ || die "failed to update LDAP settings in dovecot-ldap.conf"
+ dodoc doc/dovecot-ldap-example.conf
+ fi
+
+ # Install sieve plugin
+ if use sieve; then
+ make -C "${SIEVE_S}" DESTDIR="${D}" install \
+ || die "make install failed (sieve)"
+ fi
+
+ # Install managesieve
+ if use managesieve; then
+ make -C "${MANAGESIEVE_S}" DESTDIR="${D}" install \
+ || die "make install failed (managesieve)"
+ fi
+
+ dodir /var/run/dovecot
+ fowners root:0 /var/run/dovecot
+ fperms 0755 /var/run/dovecot
+ keepdir /var/run/dovecot/login
+ fowners root:dovecot /var/run/dovecot/login
+ fperms 0750 /var/run/dovecot/login
+}
+
+get_config_var() {
+ local varname=${1}
+ if [[ -z ${varname} ]]; then
+ die "${FUNCNAME}: variable name missing"
+ fi
+ sed -n 's/^[[:space:]]\?'"${varname}"'[[:space:]]*="*\([^#"]\+\)"*/\1/p' \
+ "${ROOT}"/etc/dovecot/dovecot.conf
+}
+
+pkg_postinst() {
+ elog "The Dovecot configuration has vastly changed since 0.99."
+ elog "You are encouraged to start afresh with a new configuration file."
+ elog "see http://wiki.dovecot.org/ for configuration examples."
+
+ if [[ -e "${ROOT}"/etc/dovecot.conf ]]; then
+ echo
+ ewarn "The Dovecot configuration now resides in ${ROOT}/etc/dovecot"
+ fi
+
+ local base_dir="$(get_config_var base_dir)"
+ base_dir="${base_dir:-/var/run/dovecot}"
+ if use ssl; then
+ # Let's not make a new certificate if we already have one
+ if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
+ -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
+ einfo "Creating SSL certificate"
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
+ install_cert /etc/ssl/dovecot/server
+ chown dovecot:mail "${ROOT}"/etc/ssl/dovecot/server.{key,pem}
+ fi
+ if [[ ! -e "${ROOT}${base_dir}/login/ssl-parameters.dat" ]]; then
+ echo
+ elog "Dovecot requires DH SSL Parameters if you use SSL connections"
+ elog "These take some time to make, and dovecot will create them before"
+ elog "it allows any SSL connections."
+ elog "You can create them now before starting dovecot like so"
+ elog " emerge --config =${PF}"
+ fi
+ fi
+}
+
+pkg_config() {
+ local base_dir="$(get_config_var base_dir)"
+ base_dir="${base_dir:-/var/run/dovecot}"
+
+ if use ssl; then
+ einfo "Regenerating SSL parameters. This will take some time."
+ "${ROOT}"/usr/libexec/dovecot/ssl-build-param "${base_dir}/login/ssl-parameters.dat"
+ fi
+}
diff --git a/net-mail/dovecot/files/dovecot.init-r2 b/net-mail/dovecot/files/dovecot.init-r2
new file mode 100644
index 000000000000..eb5b1b904c6d
--- /dev/null
+++ b/net-mail/dovecot/files/dovecot.init-r2
@@ -0,0 +1,57 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/files/dovecot.init-r2,v 1.1 2008/11/03 17:22:59 wschlich Exp $
+
+opts="reload"
+
+depend() {
+ need localmount net
+ after bootmisc ldap mysql ntp-client ntpd postgresql saslauthd slapd
+ use logger
+}
+
+checkconfig() {
+ DOVECOT_INSTANCE=${SVCNAME##*.}
+ if [ -n "${DOVECOT_INSTANCE}" -a "${SVCNAME}" != "dovecot" ]; then
+ DOVECOT_CONF=/etc/dovecot/dovecot.${DOVECOT_INSTANCE}.conf
+ else
+ DOVECOT_CONF=/etc/dovecot/dovecot.conf
+ fi
+ if [ ! -e ${DOVECOT_CONF} ]; then
+ eerror "You will need an ${DOVECOT_CONF} first"
+ return 1
+ fi
+ DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | sed -ne '/^base_dir/{s#^base_dir:[[:space:]]*\(.*[^/]\)/\?$#\1#;p}')
+ DOVECOT_BASEDIR=${DOVECOT_BASEDIR:-/var/run/dovecot}
+ DOVECOT_PIDFILE=${DOVECOT_BASEDIR}/master.pid
+ if [ ! -d "${DOVECOT_BASEDIR}" ]; then
+ ebegin "Creating missing base_dir ${DOVECOT_BASEDIR}"
+ install -d -o root -g root -m 0755 "${DOVECOT_BASEDIR}"
+ eend $?
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/dovecot \
+ --pidfile "${DOVECOT_PIDFILE}" -- -c "${DOVECOT_CONF}"
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/sbin/dovecot \
+ --pidfile "${DOVECOT_PIDFILE}"
+ eend $?
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading ${SVCNAME} configs and restarting auth/login processes"
+ start-stop-daemon --stop --oknodo --exec /usr/sbin/dovecot \
+ --pidfile "${DOVECOT_PIDFILE}" --signal HUP
+ eend $?
+}