summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanno Boeck <hanno@gentoo.org>2015-02-21 16:05:01 +0000
committerHanno Boeck <hanno@gentoo.org>2015-02-21 16:05:01 +0000
commit2c6362e6bd3dae006c61de721ed04ad5cc8769d8 (patch)
tree9acae5d64a0c9846ea73785d721bcce1ba7ffa30 /mail-mta/courier
parentUpdate HOMEPAGE & SRC_URI, https://github.com/gentoo/gentoo-portage-rsync-mir... (diff)
downloadhistorical-2c6362e6bd3dae006c61de721ed04ad5cc8769d8.tar.gz
historical-2c6362e6bd3dae006c61de721ed04ad5cc8769d8.tar.bz2
historical-2c6362e6bd3dae006c61de721ed04ad5cc8769d8.zip
Fix compiler warning, testsuite, dodoc issue and /var/run.
Package-Manager: portage-2.2.17/cvs/Linux x86_64 Manifest-Sign-Key: 0xBBB51E42
Diffstat (limited to 'mail-mta/courier')
-rw-r--r--mail-mta/courier/ChangeLog9
-rw-r--r--mail-mta/courier/Manifest31
-rw-r--r--mail-mta/courier/courier-0.74.1-r1.ebuild309
-rw-r--r--mail-mta/courier/files/courier-0.74.1-fix-implicit-declaration-warning.diff12
-rw-r--r--mail-mta/courier/files/courier-0.74.1-fix-testsuite.diff12
5 files changed, 358 insertions, 15 deletions
diff --git a/mail-mta/courier/ChangeLog b/mail-mta/courier/ChangeLog
index 916f19df4aed..063245d4c1af 100644
--- a/mail-mta/courier/ChangeLog
+++ b/mail-mta/courier/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for mail-mta/courier
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/ChangeLog,v 1.181 2015/01/15 08:46:07 nativemad Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/ChangeLog,v 1.182 2015/02/21 16:04:58 hanno Exp $
+
+*courier-0.74.1-r1 (21 Feb 2015)
+
+ 21 Feb 2015; <hanno@gentoo.org> +courier-0.74.1-r1.ebuild,
+ +files/courier-0.74.1-fix-implicit-declaration-warning.diff,
+ +files/courier-0.74.1-fix-testsuite.diff:
+ Fix compiler warning, testsuite, dodoc issue and /var/run.
15 Jan 2015; Andreas Schuerch <nativemad@gentoo.org> courier-0.74.0.ebuild,
courier-0.74.1.ebuild:
diff --git a/mail-mta/courier/Manifest b/mail-mta/courier/Manifest
index 7494e71b64bc..de222947974c 100644
--- a/mail-mta/courier/Manifest
+++ b/mail-mta/courier/Manifest
@@ -3,6 +3,8 @@ Hash: SHA256
AUX apache-sqwebmail.inc 347 SHA256 3a6616dacfd49ab0c89c62d9df5662fc3c2d9e598786d781240bf5e8900afc65 SHA512 e3f8f4f01563184ec4afc98d61ab739d5900f7d8757638fb06ff21ca3604f8c6f708730af514f6ca662559980503dee5955ba48c5a643e473054f3eec49b89a0 WHIRLPOOL e586f1bcf82af87df2285ec142f92056fd25df515b2cdc1027d62a97a26ba8205204c192c0bf0b59fb636ca84f70baadd79ea8a60bf9cb97db34e2b66aaee8f4
AUX courier-0.74.0-fix-linking.diff 1101 SHA256 638fff8645c0d23e1614cf9657cc314a22a0e3d0ec69baf576124d0f27b7d7ae SHA512 019f59a477732c154681629c70a36380e810000350aca3e6f306faf532c797ac9d1f1f8c58d9d433ef87be58e5fff2a1dced53895686faf6ede55216b4c25a95 WHIRLPOOL 246bf9aa882f210e345f0687c5c587f46625f65a4ee5d33fc2715c8866ff3b17ec663e568f82c76740e52010f24bf9e00d0ec888be5eea2deae77bcfa5cf101d
+AUX courier-0.74.1-fix-implicit-declaration-warning.diff 406 SHA256 fbf0e0035a8cf0531d4ac490d00a20f9c95d51b48c62bfc45df042fe37b0bd61 SHA512 9eb8e5064c4db87c0eaa961133269448cbb443133c79797cb8c72aba7e6c349d5edfe2c0f63734c3d87d380f0ed0beccfa50b70befdb844d645cc25815b4333b WHIRLPOOL f38cbb0eba870001ebd981386d94243e96be38bafb8f306635eb4dfba3e44982de19b6c1396f6a43b80a805a56cb3ae90ab343d65c9501f3c01523a0650cef01
+AUX courier-0.74.1-fix-testsuite.diff 358 SHA256 926b75c8ce4ec7d5a036279e0c0e806a10336287204a0ec2fffe5486774e2277 SHA512 ddf11100c4662374f8c955494b37e3b303f211e0eb5019d698442837126c5ec18d18f3b34bd0c82d66b3d68ef062c0062eb715f34c584b7c9f6aafc39af28ef3 WHIRLPOOL f12a91f9ac4e845fc33550954e56eb95a0cb1e0cf733989a3affba040e51cff81044cb2f8f9b749353e83a493283bc4acd990da8d5ee60bffcf3fba4592b4172
AUX courier-init-r4 5076 SHA256 69d826eb81803db8eb69aefc94e7d5fcdc2bb4fdc029b5bad2e486b94e71fe49 SHA512 30a575991a96110bbb79e30a7cf94c9cd5c87e364fa412f605a8856163707f04886e2955cf2b5b8a6f827ae45799adb15236fe5ea3e50fd2887dd0bf9596101f WHIRLPOOL 3218e0769b7184f8f11310f17572e1892ff6587b5ee2d9a53fa22222a320c4d5781e4974a485577c3f292acb3b914bac79bb91b18a59dfc7bc8a2a48c8b5b66f
AUX norewrite.patch 489 SHA256 526f3742fb43af93811e6e4b3210fda1c611b50ce5abdf3a57a25dfe4f5c38e4 SHA512 e9e95bd5d1a78b510f6dd7e155999089f123eecfdc16d3b5005b00981a7b6d29827cdddc61035ed3c3edcf0b9907ddfbae76df6503a1a8ef26b4de43a02bfc8e WHIRLPOOL c41a0b63a2109ac33532de0830257929995383d246eb3f84674e6fcf267ce5cc0b7e8ce339926429a7212f63aa117b5de65bc870f21b0a4a545f4b3f10827323
AUX password.dist 247 SHA256 46f20a84922d108d39a7c26ad3ba8915326549f46cea811e2384f55a589d38e2 SHA512 f488b0ab1a909c9b878b9f3f3147641a9ed6d8d2ad44c67cd641934b800b18a62de2a7f5f51fdbecfbbcdd7c39c753734984cc0836c905a3b708858e1b91093d WHIRLPOOL 98883b10ae103663d1d1205532e6c243bb462e9dc2adf1b9d6a968f9246283bbb2aabb8779ab5d8b7d052a5a3032f9d113ac74c773bf7591e81ccf086a2e51b3
@@ -11,23 +13,24 @@ DIST courier-0.74.0.tar.bz2 6952034 SHA256 13865f9e21ed8b6786323aa228892a3259391
DIST courier-0.74.1.tar.bz2 6951633 SHA256 b373c2b189affa01e8c2cfe9f60e6262bbcd98afa4e927b7fbbd68f478661ae6 SHA512 bcbb2a5b80c5e240587a75c7bb61c5620c7b43dc0bf707c8be5403856a125dfd18094b244d475f7d373f035df09c5b537e440815b5cca37afe6553e23117513a WHIRLPOOL c9e83048f920744babd1268a6804a5fcda834f4c6cf6cdc456402467567b93c7e773e57c1239a72662dd1eeab4494596b309a60071a06b2779a074981f913c3b
EBUILD courier-0.71.ebuild 9312 SHA256 66808b6d8a88c11f611c9b6e2f9571485581d9dae0c646b3f1579ff1e09ec04d SHA512 d6ed54b926c6aa38cbddb9c79eafc72c95398d452228ed70cd7d1559a9ab883a35105b5f7f0fb1ae885e72938488627d00c170009d9da50a53fad761bdb65762 WHIRLPOOL 02332216a11564d08767850111c07a5c907a76434dfb2e836ab1e0ae36d9ff728eba2e17d394fef60c17dea9a93a9606b4ecef3a9da0a1b867b5b148657243e1
EBUILD courier-0.74.0.ebuild 9412 SHA256 370e3105cc3744f4daf681a71a2e4ca4dc3f5b0fc1848bfc453b8f5d525d1ddf SHA512 9efcdea30ed45d9fa35ac08d70dc49a2a9fef015c5b028a434900c7c7dec0587e4bddaf36ae97e074fa82fdbda2d7d0ab68a5fa10051b83585ca95f8a2b50b6f WHIRLPOOL b1a26028c33f87c0c5f4c69232464e8c52b76f00b83fef0aa3fcef5257a1bdb2f2140af079e8c183ffe60c0e873339bd17d2933b74d908a33a59114e22b47dc8
+EBUILD courier-0.74.1-r1.ebuild 9551 SHA256 b9a5122141e8cd8768944f3a57d1c8613179561d98c2bb1ef4714aeb498a2ec8 SHA512 c4d414a78f41ef5fa90ce0f05a11a3ab6dcf3a61d44befc93bbe9f0fe7330d10bacea4602d223955edafd6799eff3cb261265d55537462a7562b2fe2349decac WHIRLPOOL c7b09a6a3318f428781bdb83e71a732b4ad1e55f257c024f8d27f5eef111fd89f332f885884dc6544c14d93f8b08194badbd120a30e6bd295c3486d106f52c53
EBUILD courier-0.74.1.ebuild 9358 SHA256 983eb1ce9650d016daf4f82dd1505eb92801c9d4c433c64f78ed2ad880ec3e8b SHA512 4a1f7136996d686459077998a72f8b86c63b0a692f7fcc7df17e1044723e5732d387eb2c08530c2ac0216136645c4de461a188f7e8f286b04da603d71ee725f6 WHIRLPOOL 224d78e46dfdbb6c11edfd7f076dd60a8d814612f3c650e022b6434fb737e6dca890b0dd882b26a8f913a835b961bb3554970f42f8d9611a15f3381b398614f6
-MISC ChangeLog 40026 SHA256 c7c03860949cfb790229099f9bf680a57c6eed30ea0ebde234d1f808a2f7b956 SHA512 6d2313c04b0fefd75dad0824580a53e819e8bc4bffb24395a2e41e5baa0a0fcaa953850a323e4717a200acf074e5d2ed29cb41a95a41e398030cb9f481d40211 WHIRLPOOL 0d79700a4afd096e90ea2ead8d7a79bd0718ed5adbb46e98145f2df4144b1a590cff782be6ee937485fd542ea2502f09bd228275d333c32aad8c281a1b48a227
+MISC ChangeLog 40286 SHA256 2822e82fe071d6720663f4a4f009952733194e951be75909228ccf14b6881f0f SHA512 b82995f12baa9156427d893d2b39ea123a5eb9319e2c2c790e574d4c451713ddd200e6cb856aaebf2a985bdf0a2c0d884d21b531fe0aaacf88c59398c72abeeb WHIRLPOOL 996b37092983a7e8492517358e3a9614c0dfc5c02d77332af7d76d0d8b04c6c927ad3c7d3177d95bfd123c0f3d87f697ffb7f52de8ccf93eac351732ed2c5ba4
MISC metadata.xml 688 SHA256 1cb15a4a98fc9fae0e167e7aa9f8672f3456af2320bb3f8f011ecb612eaa1557 SHA512 07955a3efaadb572270bcaf9fab65f988d3999834fb95515003e7022707731877efbb7a749622b57b3a768db27db331a5efb3beb0637ac8e6def1d667dcc93ae WHIRLPOOL 07da4b25e2640c2ce0318e5fa2086b3f4f187e821940b7304184a0b4634e0dfe55edc7b359430c76c6617ed512ff68ad33cae150c1e34e0deb9d04484c0408aa
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-iQIcBAEBCAAGBQJUt35XAAoJEIug43o+kWudFJMP/AhanSbPhHGjxYlgyORaJnam
-sqzeV/4ZzPkhsTWGYiEV1uARReAhCXopJsHTnszJpC3n7YaWw1x3pfbDWVdhx6UV
-MMXd/xceuz/aDBHSjaRWF1YMCuDiHRje0Gwv918MxVjF3dHhdkf7Yowic6xgODs4
-beTS0/odLaOOw7LrAYkfo+YgCv8dUd6oZZixFzqOs/XcxbrcsBDJChOqPs+LPNSu
-0bH+jBRMDowh5ymO00/D+JZnyYQmj0HUCm8GJtyrrHCkELVjd1B8+ttTflGgM18U
-idk0smRJS7F/8PAFQ78jckHtAmrbGgDrNxAnuIt2NOlcTQsuYDSa+xO3ad7JdIBA
-e8iMJ0wTToip5FKiXzt2cPkO8ulYJHNRj07prUU7dMyv3vcBZh9lLyEXQoGhQtS8
-EdVtKz4RCh5ROubjFD840KjHDoSUpot7qiB4s4n1Mfk794rBPHIa2qg56QaHXpzp
-To+wMo31WCUv3A75kExIRr8S1b+xl8wkhVaDpqzraZA2wVSrDcEG/8EFU37mXDWk
-Zro3a4uM0P5/HUFYnzL8AbJOoqgHI5mcHzd9ud4MfZ6UaephVIxMFJ/qw4fx2P7v
-KmjtiQeUNgFD6NyFqyumsEZu4bwD19bDJSzV2cLAB8uTr5Lk1rE6Yoxa4i0GwJS9
-sKZ+DFy3NPy1DxCuwK4d
-=DzVL
+iQIcBAEBCAAGBQJU6KyqAAoJEKWIAHK7tR5CfY8P/AiAs19gxMkG0OIig8PtpPB5
+hBkpbh1+fwdT3/jKUvwWIr2G3QLWGN5t70HHPYpp6V0AC3s8HD3Go8SYd9NsR6pq
+xkghSL+W0vN7IlyEgry3pO81RtsTZ3E7OM4iwXGQlKe2VFaY1gUqhXsECxkp86Di
+kdmi3EvpAMmaitQIzS/633X/M5ZfFMJOTOXYIiroyYsIIbd0Uyea8QU3b7XRBaJ4
+t77u6BGMtCfCuixwx4NASTLHDkMoCl5bqSUGPY4iZvypaJft862bzokyJqQ4N9Sl
+52E3YQrFI1+FWfjFUgC+DVi7/VV03sdzqc1xMQ4q2/sXKreSVY2pY47ubO9nvo5H
+7ti7T7yc4zIeXGyD12QII8Pbd9U12psQCBETRuuIkkLbMWMUsGBxpTqHbaPm9K3L
+kbdQgFRCYpIlsT+veB/OLgLYvhLs5BcN1DTEQwO/SaI8lX2u0Jumx3Hl9Jzvqykl
+Hq/Me7xwUSqWuPhsGtgz0x42gfuEHM2zWEeNGulTt4iH3nURKUJAny8TeoK7XUdP
+5wqocAVnAWq0UaNtk2YBge4FUXMDTPeZ162/PlWlfeH1pyeDnYR7yFsApeBXf3vf
+4LYwTYkcUIyrA7VOKQFFf2t4DqyIJA+raFw5hT9PHjx7zYpx/ERZeYS6qVEct9NH
+qn6J0+9+Ir3KQhW7Dpos
+=8+dW
-----END PGP SIGNATURE-----
diff --git a/mail-mta/courier/courier-0.74.1-r1.ebuild b/mail-mta/courier/courier-0.74.1-r1.ebuild
new file mode 100644
index 000000000000..9ea03a945d93
--- /dev/null
+++ b/mail-mta/courier/courier-0.74.1-r1.ebuild
@@ -0,0 +1,309 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/courier-0.74.1-r1.ebuild,v 1.1 2015/02/21 16:04:58 hanno Exp $
+
+inherit eutils flag-o-matic multilib
+
+DESCRIPTION="An MTA designed specifically for maildirs"
+SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
+HOMEPAGE="http://www.courier-mta.org/"
+SLOT="0"
+LICENSE="GPL-2"
+# not in keywords due to missing dependencies:
+# ~arm ~s390 ~ppc64 ~alpha ~hppa ~ia64 ~ppc ~sparc ~x86
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="postgres ldap mysql pam nls ipv6 spell fax crypt norewrite \
+ fam web webmail gnutls"
+
+DEPEND="
+ >=net-libs/courier-authlib-0.66.1
+ net-libs/courier-unicode
+ !gnutls? ( >=dev-libs/openssl-0.9.6 )
+ gnutls? ( net-libs/gnutls )
+ >=sys-libs/gdbm-1.8.0
+ dev-libs/libpcre
+ app-misc/mime-types
+ fax? ( >=media-libs/netpbm-9.12 app-text/ghostscript-gpl >=net-dialup/mgetty-1.1.28 )
+ pam? ( virtual/pam )
+ mysql? ( virtual/mysql )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( dev-db/postgresql )
+ spell? ( app-text/aspell )
+ fam? ( virtual/fam )
+ !mail-filter/maildrop
+ !mail-mta/esmtp
+ !mail-mta/exim
+ !mail-mta/mini-qmail
+ !mail-mta/msmtp
+ !mail-mta/netqmail
+ !mail-mta/nullmailer
+ !mail-mta/postfix
+ !mail-mta/qmail-ldap
+ !mail-mta/sendmail
+ !mail-mta/ssmtp
+ !mail-mta/opensmtpd
+ !net-mail/dot-forward
+ !sys-apps/ucspi-tcp
+ "
+
+RDEPEND="${DEPEND}
+ dev-lang/perl
+ sys-process/procps"
+
+# get rid of old style virtual/imapd - bug 350792
+# all blockers really needed?
+RDEPEND="${RDEPEND}
+ !net-mail/bincimap
+ !net-mail/courier-imap
+ !net-mail/cyrus-imapd
+ !net-mail/uw-imap"
+
+PDEPEND="pam? ( net-mail/mailbase )
+ crypt? ( >=app-crypt/gnupg-1.0.4 )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/courier-0.74.1-fix-testsuite.diff"
+ epatch "${FILESDIR}/courier-0.74.1-fix-implicit-declaration-warning.diff"
+ use norewrite && epatch "${FILESDIR}/norewrite.patch"
+}
+
+src_compile() {
+ filter-flags '-fomit-frame-pointer'
+
+ local myconf
+ myconf=""
+
+ use ldap && myconf="${myconf} --with-ldapconfig=/etc/courier/maildropldap.conf"
+
+ econf ${myconf} \
+ $(use_with fam) \
+ $(use_with ipv6) \
+ $(use_with spell ispell) \
+ $(use_with ldap ldapaliasd) \
+ $(use_enable ldap maildroldap) \
+ $(use_with gnutls) \
+ --enable-mimetypes=/etc/mime.types \
+ --prefix=/usr \
+ --disable-root-check \
+ --mandir=/usr/share/man \
+ --sysconfdir=/etc/courier \
+ --libexecdir=/usr/$(get_libdir)/courier \
+ --datadir=/usr/share/courier \
+ --sharedstatedir=/var/lib/courier/com \
+ --localstatedir=/var/lib/courier \
+ --with-piddir=/var/run/courier \
+ --with-authdaemonvar=/var/lib/courier/authdaemon \
+ --with-mailuser=mail \
+ --with-mailgroup=mail \
+ --with-paranoid-smtpext \
+ --with-db=gdbm \
+ --disable-autorenamesent \
+ --cache-file="${S}/configuring.cache" \
+ --host="${CHOST}" debug=true || die "./configure"
+ sed -e'/^install-perms-local:/a\ sed -e\"s|^|'"${D}"'|g\" -i permissions.dat' -i Makefile
+ emake || die "Compile problem"
+}
+
+etc_courier() {
+ # Import existing /etc/courier/file if it exists.
+ # Add option only if it was not already set or even commented out
+ file="${1}" ; word="`echo \"${2}\" | sed -e\"s|=.*$||\" -e\"s|^.*opt ||\"`"
+ [ ! -e "${D}/etc/courier/${file}" ] && [ -e "/etc/courier/${file}" ] && \
+ cp "/etc/courier/${file}" "${D}/etc/courier/${file}"
+ grep -q "${word}" "${D}/etc/courier/${file}" || \
+ echo "${2}" >> "${D}/etc/courier/${file}"
+}
+
+etc_courier_chg() {
+ file="${1}" ; key="${2}" ; value="${3}" ; section="${4}"
+ [ -z "${section}" ] && section="${2}"
+ grep -q "${key}" "${file}" && elog "Changing ${file}: ${key} to ${value}"
+ sed -i -e"/\#\#NAME: ${section}/,+30 s|${key}=.*|${key}=\"${value}\"|g" ${file}
+}
+
+src_install() {
+ local f
+ diropts -o mail -g mail
+ keepdir /var/lib/courier/tmp
+ keepdir /var/lib/courier/msgs
+ make install DESTDIR="${D}" || die "install"
+ make install-configure || die "install-configure"
+
+ # init script takes care of this
+ rm -rf "${D}/var/run"
+
+ # Get rid of files we dont want
+ if ! use webmail ; then
+ rm -rf "${D}/usr/$(get_libdir)/courier/courier/webmail" \
+ "${D}/usr/$(get_libdir)/courier/courier/sqwebmaild" \
+ "${D}/usr/share/courier/sqwebmail/" \
+ "${D}/usr/sbin/webmaild" \
+ "${D}/usr/sbin/webgpg" \
+ "${D}/etc/courier/webmail.authpam" \
+ "${D}/var/lib/courier/webmail-logincache" \
+ "${D}"/etc/courier/sqwebmaild*
+ fi
+
+ if ! use web ; then
+ rm -rf "${D}/usr/share/courier/courierwebadmin/" \
+ "${D}/etc/courier/webadmin"
+ fi
+
+ for dir2keep in $(cd "${D}" && find ./var/lib/courier -type d) ; do
+ keepdir "$dir2keep" || die "failed running keepdir: $dir2keep"
+ done
+
+ newinitd "${FILESDIR}/courier-init-r4" "courier"
+ use fam || sed -i -e's|^.*use famd$||g' "${D}/etc/init.d/courier"
+
+ cd "${D}/etc/courier"
+ if use webmail ; then
+ insinto /etc/courier
+ newins "${FILESDIR}/apache-sqwebmail.inc" apache-sqwebmail.inc
+ fi
+
+ for f in *.dist ; do cp "${f}" "${f%%.dist}" ; done
+ if use ldap ; then
+ [ -e ldapaliasrc ] && ( chown root:0 ldapaliasrc ; chmod 400 ldapaliasrc )
+ else
+ rm -f ldapaliasrc
+ fi
+
+ ( [ -e /etc/courier/sizelimit ] && cat /etc/courier/sizelimit || echo 0 ) \
+ > "${D}/etc/courier/sizelimit"
+ etc_courier maildroprc ""
+ etc_courier esmtproutes ""
+ etc_courier backuprelay ""
+ etc_courier locallowercase ""
+ etc_courier bofh "opt BOFHBADMIME=accept"
+ etc_courier bofh "opt BOFHSPFTRUSTME=1"
+ etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none,error,softfail,fail"
+ etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none"
+ etc_courier bofh "opt BOFHSPFFROM=all"
+ etc_courier bofh "opt BOFHSPFMAILFROM=all"
+ etc_courier bofh "#opt BOFHSPFHARDERROR=fail"
+ etc_courier esmtpd "BOFHBADMIME=accept"
+ etc_courier esmtpd-ssl "BOFHBADMIME=accept"
+ etc_courier esmtpd-msa "BOFHBADMIME=accept"
+
+ use fam && etc_courier_chg imapd IMAP_CAPABILITY "IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE"
+ use fam || etc_courier_chg imapd IMAP_CAPABILITY "IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256"
+
+ # Fix for a sandbox violation on subsequential merges
+ # - ticho@gentoo.org, 2005-07-10
+ dosym /usr/share/courier/pop3d /usr/sbin/courier-pop3d
+ dosym /usr/share/courier/pop3d-ssl /usr/sbin/courier-pop3d-ssl
+ dosym /usr/share/courier/imapd /usr/sbin/courier-imapd
+ dosym /usr/share/courier/imapd-ssl /usr/sbin/courier-imapd-ssl
+
+ cd "${S}"
+ cp imap/README README.imap
+ use nls && cp unicode/README README.unicode
+ dodoc AUTHORS BENCHMARKS COPYING* ChangeLog* INSTALL NEWS README* TODO courier/doc/*.txt
+ dodoc libs/tcpd/README.couriertls
+ mv "${D}/usr/share/courier/htmldoc" "${D}/usr/share/doc/${PF}/html"
+
+ if use webmail ; then
+ insinto /usr/$(get_libdir)/courier/courier
+ insopts -m 755 -o mail -g mail
+ doins "${S}/courier/webmaild"
+ fi
+
+ if use web ; then
+ insinto /etc/courier/webadmin
+ insopts -m 400 -o mail -g mail
+ doins "${FILESDIR}/password.dist"
+ fi
+
+ # avoid name collisions in /usr/sbin, make webadmin match
+ cd "${D}/usr/sbin"
+ for f in imapd imapd-ssl pop3d pop3d-ssl ; do mv "${f}" "courier-${f}" ; done
+ if use web ; then
+ sed -i -e 's:\$sbindir\/imapd:\$sbindir\/courier-imapd:g' \
+ -e 's:\$sbindir\/imapd-ssl:\$sbindir\/courier-imapd-ssl:g' \
+ "${D}/usr/share/courier/courierwebadmin/admin-40imap.pl" \
+ || ewarn "failed to fix webadmin"
+ sed -i -e 's:\$sbindir\/pop3d:\$sbindir\/courier-pop3d:g' \
+ -e 's:\$sbindir\/pop3d-ssl:\$sbindir\/courier-pop3d-ssl:g' \
+ "${D}/usr/share/courier/courierwebadmin/admin-45pop3.pl" \
+ || ewarn "failed to fix webadmin"
+ fi
+
+ # users should be able to send mail. Could be restricted with suictl.
+ chmod u+s "${D}/usr/bin/sendmail"
+
+ dosym /usr/bin/sendmail /usr/sbin/sendmail
+}
+
+src_test() {
+ if [ `whoami` != 'root' ]; then
+ emake -j1 check || die "Make check failed."
+ else
+ einfo "make check skipped, can't run as root."
+ einfo "You can enable it with FEATURES=\"userpriv\""
+ fi
+}
+
+pkg_postinst() {
+ use fam && elog "fam daemon is needed for courier-imapd" \
+ || ewarn "courier was built without fam support"
+}
+
+pkg_config() {
+ mailhost="$(hostname)"
+ export mailhost
+
+ domainname="$(domainname)"
+ if [ "x$domainname" = "x(none)" ] ; then
+ domainname="$(echo ${mailhost} | sed -e "s/[^\.]*\.\(.*\)/\1/")"
+ fi
+ export domainname
+
+ if [ "${ROOT}" = "/" ] ; then
+ file="${ROOT}/etc/courier/locals"
+ if [ ! -f "${file}" ] ; then
+ echo "localhost" > "${file}";
+ echo "${domainname}" >> "${file}";
+ fi
+ file="${ROOT}/etc/courier/esmtpacceptmailfor.dir/${domainname}"
+ if [ ! -f "${file}" ] ; then
+ echo "${domainname}" > "${file}"
+ /usr/sbin/makeacceptmailfor
+ fi
+
+ file="${ROOT}/etc/courier/smtpaccess/${domainname}"
+ if [ ! -f "${file}" ]
+ then
+ netstat -nr | grep "^[1-9]" | while read network gateway netmask rest
+ do
+ i=1
+ net=""
+ TIFS="${IFS}"
+ IFS="."
+ for o in "${netmask}"
+ do
+ if [ "${o}" == "255" ]
+ then
+ [ "_${net}" == "_" ] || net="${net}."
+ t="$(echo "${network}" | cut -d " " -f ${i})"
+ net="${net}${t}"
+ fi
+ i="$((${i} + 1))"
+ done
+ IFS="${TIFS}"
+ echo "doing configuration - relay control for the network ${net} !"
+ echo "${net} allow,RELAYCLIENT" >> ${file}
+ done
+ /usr/sbin/makesmtpaccess
+ fi
+ fi
+
+ echo "creating cert for esmtpd-ssl:"
+ /usr/sbin/mkesmtpdcert
+ echo "creating cert for imapd-ssl:"
+ /usr/sbin/mkpop3dcert
+ echo "creating cert for pop3d-ssl:"
+ /usr/sbin/mkimapdcert
+}
diff --git a/mail-mta/courier/files/courier-0.74.1-fix-implicit-declaration-warning.diff b/mail-mta/courier/files/courier-0.74.1-fix-implicit-declaration-warning.diff
new file mode 100644
index 000000000000..e21da955d17c
--- /dev/null
+++ b/mail-mta/courier/files/courier-0.74.1-fix-implicit-declaration-warning.diff
@@ -0,0 +1,12 @@
+--- courier-0.74.1/libs/rfc1035/testlookup.c 2014-11-04 13:15:00.000000000 +0100
++++ courier-0.74.1-1/libs/rfc1035/testlookup.c 2015-02-16 13:36:14.455760592 +0100
+@@ -41,6 +41,9 @@
+
+ extern char rfc1035_spf_gettxt(const char *current_domain,
+ char *buf);
++extern char rfc1035_spf_gettxt_n(const char *current_domain,
++ char **buf);
++
+
+ static void spflookup(const char *current_domain)
+ {
diff --git a/mail-mta/courier/files/courier-0.74.1-fix-testsuite.diff b/mail-mta/courier/files/courier-0.74.1-fix-testsuite.diff
new file mode 100644
index 000000000000..b19bf2fc6fca
--- /dev/null
+++ b/mail-mta/courier/files/courier-0.74.1-fix-testsuite.diff
@@ -0,0 +1,12 @@
+--- courier-0.74.1-plain/libs/maildrop/testsuite2 2013-08-30 02:36:07.000000000 +0200
++++ courier-0.74.1/libs/maildrop/testsuite2 2015-02-16 13:22:37.455698929 +0100
+@@ -232,7 +232,8 @@
+
+ for f in testsuite?.filter
+ do
+- echo 'xfilter "cat"' >t
++ echo "SHELL=/bin/sh" > t
++ echo 'xfilter "cat"' >>t
+ cat $f >>t
+ chmod 600 t
+ mv -f t $f