diff options
author | Eray Aslan <eras@gentoo.org> | 2012-12-19 08:23:45 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2012-12-19 08:23:45 +0000 |
commit | d1164676850da69d7bf165bf2f3e5a941b8ff6ab (patch) | |
tree | 84f0641fbaaee3b370b974b4d3376c911caddca9 /net-mail | |
parent | Drop duplicate patch, which caused no problems, but obviously isn't necessary (diff) | |
download | historical-d1164676850da69d7bf165bf2f3e5a941b8ff6ab.tar.gz historical-d1164676850da69d7bf165bf2f3e5a941b8ff6ab.tar.bz2 historical-d1164676850da69d7bf165bf2f3e5a941b8ff6ab.zip |
Bring back dovecot-2.0.19 from dead for dovecot_deleted_to_trash and dovecot-antispam packages
Package-Manager: portage-2.2.0_alpha149/cvs/Linux x86_64
RepoMan-Options: --force
Manifest-Sign-Key: 0x77F1F175586A3B1F
Diffstat (limited to 'net-mail')
-rw-r--r-- | net-mail/dovecot/ChangeLog | 8 | ||||
-rw-r--r-- | net-mail/dovecot/Manifest | 21 | ||||
-rw-r--r-- | net-mail/dovecot/dovecot-2.0.19.ebuild | 282 |
3 files changed, 306 insertions, 5 deletions
diff --git a/net-mail/dovecot/ChangeLog b/net-mail/dovecot/ChangeLog index e572151c9e4e..24e5c81b447e 100644 --- a/net-mail/dovecot/ChangeLog +++ b/net-mail/dovecot/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-mail/dovecot # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.398 2012/12/15 17:53:00 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.399 2012/12/19 08:23:34 eras Exp $ + +*dovecot-2.0.19 (19 Dec 2012) + + 19 Dec 2012; Eray Aslan <eras@gentoo.org> +dovecot-2.0.19.ebuild: + Bring back dovecot-2.0.19 from dead for dovecot_deleted_to_trash and dovecot- + antispam packages 15 Dec 2012; Raúl Porcel <armin76@gentoo.org> dovecot-2.1.12-r1.ebuild: alpha/ia64/s390/sh/sparc stable wrt #445844 diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest index c847674a683d..4542bb1d49ea 100644 --- a/net-mail/dovecot/Manifest +++ b/net-mail/dovecot/Manifest @@ -4,6 +4,8 @@ Hash: SHA256 AUX dovecot-2.1.9_managesieve_gold.patch 1938 SHA256 e81efbc39b710d010a407a0f9863f3a41801bee6c4423a9c36c09c87e906cdae SHA512 17152599dda9a2d34f6a1e6a885dc0887db503d701e00d875878dfb594f3778f99e5194e98cf74c999c643b7faab314f224b9023f7e0cb038fbc25c1488aa216 WHIRLPOOL 2b125645dbd7a108c6646cf22aabb4d9695b4d7d156c7afafefffbb299ad7625aa7cf6119df81da28725f87e757da295bed8eb79e0c53ce86558ffbc8a4f3a2a AUX dovecot.init-r3 1609 SHA256 b4fb8ffb9aa7fd270d45512a657dcb5597ae5fe516b1f8e0078aa1892de8ecaa SHA512 957801c0e65153b0e0f394de8e6f6e66ae56427d64823e9937deaf98fda18ce82b2da6c4a0f42a2a46f8492923cf079b41c437b6b3558eeec0a81faa61c3c761 WHIRLPOOL 552a8333f7093727c6e67cce28abf730bb1bf3ed676895797e617308d1da133fd88636e34e080bebe81d8cadce2b9f0aa99f9e6d49ff2d69f7014a5fc6c3a499 AUX dovecot.init-r4 1609 SHA256 510ebab9dc59832502a9a23d48d12b6e81f3c51c52f5e6652b00b240f621d02e SHA512 9aa5040cd169bfa0dea382d839ef73454105d3befd1e904cef8d0a07eb260051f72f130ba250d716b9bf9b22af542907446e02c4ec92f1c229a2c0a9f560e2cc WHIRLPOOL 51726ed76100521e54470137dab9869537dcf49a58872614312295dff3efab53ac58da30b8bfaaf86677f47ef1e84019e47529226c0a736eed68cac6ce64ae40 +DIST dovecot-2.0-pigeonhole-0.2.6.tar.gz 1234253 SHA256 49829e4aed763848b63b2bf9e288d4bc94020c924ce0621bc850e0a4bf4821ab SHA512 fca27338a139231a591f876a3e376e68bf17062d8aa577594b1f1384dbc9e009cd3894d7509c5cc5ebf3f144622125250caf03438a9f211c013bc916ef8f5419 WHIRLPOOL bee33dd90bde16c8cbdaaa746f8edeeeeda5ac652f5ed2ab23fb44b7e1a923ac3fc305f76ffe32d096d0d4f1ce5414464b2fd1f5ae042e6e014cc31763b3ea3a +DIST dovecot-2.0.19.tar.gz 3357056 SHA256 50e49e181acea7f2c08008c5a61500c01803dc36b5ae1e6ffe24c1c56e3c69b4 SHA512 a6a54675c3f991a9c86a285d3fcbd388ba92f902e032362a6fc846522090daf05b8e2d4bae623a1568120384c981105c8b80c1ab0f365fdb1c22da1a84e025f9 WHIRLPOOL aad7772edf993c364cc53b36425c2a34b1170215a6f54cb22ea34cbf5b5b587602e393e38ca98e583129f2673d6f467e466f554eb5277e49ad5126305ca93ae4 DIST dovecot-2.1-pigeonhole-0.3.1.tar.gz 1084148 SHA256 e95d86c5cd912c9a7e180414ffd5eee52e1b5dc8abef3d5762b950d1de86b5c7 SHA512 9df0a428f43287606522120a368c07513b39852325c436bc9c523e52f82a4c97232991ca832630baaa8c704adc2234ed18c2c0a63f8211f7f412dbe285436240 WHIRLPOOL 72e346e338a3e0149cc978ccc9c54943efad165d82d54cade1d954688f1806b30b3509c7f90c6589673c2808f9d85497af28aec63e2e060ca5934ea4ef101e9a DIST dovecot-2.1-pigeonhole-0.3.2.tar.gz 1078365 SHA256 532477bfa7aa49501c8709e213316e8d02f221fd019ca34772bad26d404fe243 SHA512 cebe17a9dba67d584515fc2267fc2007fb41e9c2e966608ea2e6f48a571fb6904414ef46b9a1f795d53a2a70396c34db375f6e7e3294c34476f20d5277e0cfaa WHIRLPOOL 92895e4b243509894ea7f018269f86a1766dcc72e282ee970fff22b679fecbdee11f2ce84ef8d056c4a6ef88d89a43d10bc4969c4754c2d3ec10ed72e1c523a7 DIST dovecot-2.1-pigeonhole-0.3.3.tar.gz 1078559 SHA256 1d581f6292c6e760b26a06193a0af266ba3b6f3a0431e6617fcf6e1c84f7dd0e SHA512 1e9b611fce25860e3c1663bb98ba14d823cd7903ca9889194da157180e296c5a38de368bef0ff152620644963b51f2a0648673a0136f304d677e88ba2ee4e9be WHIRLPOOL f83c77559e1bf98e4f8b29652d5a66720fe9f1264af3ec943fd4c184071e2c0495cca4b86d541eee91fd34f3cd6cf902e8e347cb2dab55b8ecb51d4db2c50a98 @@ -11,18 +13,29 @@ DIST dovecot-2.1.10.tar.gz 3843490 SHA256 8acc99c2a7e8b598aef2fef443c5fb6779099e DIST dovecot-2.1.11.tar.gz 3838856 SHA256 0ffdf2c61b46fb7f8e11f59284ec57693ff7469f3e6c1354658cbd8668ebc265 SHA512 c934b095b37f95bdeaaa79cf26e9cab2b6f93ce6e3104da20799e93172c8067831ea8cdc38b7b4862cb199bc4bfbe95d1dd0eaef6e439291720c7974352beb5c WHIRLPOOL 1d94da63a0da2e7bc9983d3995c3e90d3d6dfdf4958306328b3188fb5c7d8d9e4434eb2f08a973399f9912047c0df85755bed6cc4f3e04686622734f639394c2 DIST dovecot-2.1.12.tar.gz 3839088 SHA256 d76ae15146452d053c423d883b2cbc24f62a55cf2f1f547577f42bc7d8d20840 SHA512 269beb56be927c33415fe0c0a94c73331b32a4d0104f28e98e9a24ea27475450abb18c8fea1aa134ac8f9747a0fe2fe92049c7318929dee7ef6126a0d7a0f6dd WHIRLPOOL 9b3f615b17d88ed67829960220fd27ae2a9b64cc31d2395a7dff9a349c217b7505454d2f3c0aeac5d1e6dc42602a42b715ab6b9620e3e4128c4a6cdc19acc333 DIST dovecot-2.1.9.tar.gz 3829755 SHA256 77d11112bced9e2bbb1410ce5e6464af477775315ec67c7f3ab4d0da64e3c512 SHA512 da16bce6fdb535dd8eb48b4626444296e78808613f5a0d3d28dd7a509a82a276ee4f34d3ed8c339a98bd6aaee10ddf1c2df62060748b4c603a06ab165086d8de WHIRLPOOL f5bfe022687f36fcb06aa46165d6ffe8323bd13e990b7acecaed6af91226c5b06bc1e479f242dd6f963ff6039f633d790221559af42c4debf39ca252715a81f3 +EBUILD dovecot-2.0.19.ebuild 8872 SHA256 672190f8898d8587dad95872745bb65af195a77e2894527091e9032d4259a366 SHA512 52ef08b376d6bf6a443e9c4aea0db3b6a1a80e3cc0a899558e6dbdac6f36fbee5a1a84eb96f1d396a114ec74bafcb8ffada4a64a05a976fdbdc88c800dd0ccc3 WHIRLPOOL d4debf95e6404d908ccfbc1b01315902f77364c998488e1edd13b4a1008c308a3ba51479d228df4969e00efc29bab849216453d847d602f058674fb742aae6a2 EBUILD dovecot-2.1.10.ebuild 8523 SHA256 71869c90e3cbfef35aa97199703603c5cf2a02e433bf08a78c0de0a9d38babb4 SHA512 e98664586ca9571b7100f306297d9a5814945f3232ef360b3e7dd9c52702f30260eb99362f8172296178680624d7a72f7ebf79410eb91707f228b97574045431 WHIRLPOOL 89d823437ebc0db3227c2258d1f92d95e4103c7f676e3d424b1712691e45e6f309a2ad2535ea280523d565c85864af7549c636591ea03d0476d914deaf7505f4 EBUILD dovecot-2.1.11-r1.ebuild 8501 SHA256 8d8acb679e0730d0943c323e6aeb7ab0a1fe94365c19d26ae333c2f9e10ce9f2 SHA512 82843114f3b68d615336d0176ac3aa8eee80d0a5c1ccf09e9fe074c8fb173ea9f000448486452acafcf20e1a8344b43b7d2bf4249383bd7d34af22f8d2b26425 WHIRLPOOL d727bbeac45bf4ad0646b1b2002c2c14d92d67c7aa4d83e013ef1bc48a48f479ac413ac6c4c2101aa0158b8522e9ba9852adc6e4a3b9ee66b6824f0fe1ba7601 EBUILD dovecot-2.1.11.ebuild 8498 SHA256 0e7939d44a5423c56a06d51ce4e52386b34a26396a494eac1741a60794358ce1 SHA512 9efe2f252b58f329815f80629ed2a0e22d6a78b64fc9d0ff2ba2dd6bb6ebcc76a84d5404326f194d8b13c38146e63bc846e7fed7b24da56840c598dc263d14ef WHIRLPOOL 9b2f65e6c1dbceaec1e7111f4f87c91a95946e07d8293aa44569e6cac0ffc24f7fc2bbe505c132aed03e3d49f0975704e5dbac3408c66e33507c67a426811d13 EBUILD dovecot-2.1.12-r1.ebuild 8493 SHA256 3e8f612462c3fb31fc62ff5e60a544287cbad07d2e17ead11d03a43b3d2495c5 SHA512 1c82b20e29ade1ab739466e52ce0cab1085403ead2798ae68bbdf4bd9b49c38354285e3d17de1147a4440f790df78836140927f3b0cd489fcb7eeba26ef935bd WHIRLPOOL 3ce5546193a5989941fcfef8d61bc0831702c9f9721f9bcd387ee740f4b4aa4597dbf3786448eaec114029c48a93c7638b35e06f875eb3be1274d96cddf1e8f7 EBUILD dovecot-2.1.12.ebuild 8498 SHA256 f2bd9b31682140a2ab50016f40d00b1dc25b9ffbdc78d685e2bb5adc1f0b3229 SHA512 d9a809dd1e6de0efbe3a6980498a8007d1049faaec69d12014f1684db8b26f86ee8c9723d105512ca870a91e8be50035b8d3814c2aea47bd2f381bd6299a02a5 WHIRLPOOL 6f1f5b64d94550df29a4ec0f7f75d16859eb44980576e768214dced1483afce42b032231c7c76d8aec8e5800230a7c41aa7f9ada8948b4c57773cc56ddb6ac28 EBUILD dovecot-2.1.9.ebuild 8711 SHA256 7d1dcd87630cd6ea0692aeb1b3e5a323692935948634610fac6ecadc6a0c4e2b SHA512 15d6ec32508190d166eeeb5ba195e9228d58da7834cc0f670f68d43357b8dd8c3b82fbab909ea7d232ca0d8676820af4946d66acefc836526d598f61d249df33 WHIRLPOOL 73ce697ed35a319b87e2e9b4bc6286c848a847b0c72c14cc18f31e381d3815952567ef02b4c23fe280e473983ebbf078101539234ccc532810a5f73c601a5d36 -MISC ChangeLog 60389 SHA256 edfaef4dea33a3a49ddfa9d9b538891a08e6724a57bff1ca92c282d0bc587da8 SHA512 4102b690b8211b0dcd968610206e3b2b6ee5527367e54d452798f553cc29ad4801c4d13c22a1c3cb42622c9158a93233d7b19b24caba634a7be86226767718b6 WHIRLPOOL 5c7c963e4cc6dfcb097c569c25fa3df4cc856f3d05a3322e524dca656ff0e20baa9fb52a0797513cbf4388490be898267f1d4169de9429c8da17fb73999f3f98 +MISC ChangeLog 60586 SHA256 54e3bd85ce7bd429d0d148798d79d4056dd6e8d377aacbf966a9d0af5be59748 SHA512 8bf23c380df5c12ca5f5b661fba15b6e7c5bc9bbfc093d4d85862027e468240f5b0aafd501bf0ba338f32f24e73310e637f30af912888d1421e2ee78a511bd44 WHIRLPOOL c50aeb7be14f0facb55f78cfca531ea9360a6266c402b9e14767d63401f7ec08725b7734bec07b44f26895047b95f197c0bc1ab94641fed63ad8506764dfae69 MISC metadata.xml 933 SHA256 812401153320655b32b0f2fedd9f76466f45163240e0080a9ad186b78d22e068 SHA512 41aa2b321d6a865df42b29ba13fe8135167a91064f26a4221f5a9bd3fbaa0e8bb578927c57e7024bf1930ec7c15f60834df3efea794e7823003b70bf9cfdfc3c WHIRLPOOL ad79725cb991235ae60249280866d245d890a5824766e467dfd281aa9c4df1158b1f54931a033f6cbb78d4863c112135c36e93183bc235ce9be8bda26d6cb3c0 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iEYEAREIAAYFAlDMuP0ACgkQuQc30/atMkB1YACgvy+ejrfh4B2QdVh8D2AuKWF6 -DG4AoKRP1TSzUvB0/qwMuEybnKIi0mAp -=n0Vj +iQIcBAEBCAAGBQJQ0XmQAAoJEHfx8XVYajsf1cAP/0DqWpfIcvsGdVKVeDhrH44N +UmamRdVhoAwOu5HlweCzmisatQCkXFjyq0ob1AOANSpmlJEZPBYlRWbCBrmYheOX +Y8pK3mLF2l3jdCkkApuqPZMgr0aP3TFQNgoY3Ow1bJaKsGnyN0GGdDS/+JcXWRKs +fcrh5dUtGsrcBRApDaV8areaPD11VA2r4uaS9Pa2pZBdLvTas4Jd93KW2ppbwS0n +i0S75PIUNfp1J9KsyynTFNHd5LzqkxpY9YqzmgAbjtoBNeHdUyZ52YMJPMeV0mxV +cG+3JD4OJeuYGtBGZyc05AKD5rx7E7QMDkczgZQ+XwJR29KgAAq+oXz259hmJ7OU +n/VQL1VG2pNpYvxAIAgjEShTMFT03l/8MbwSzCIXlMTDrx0L41HF/t6RlWh72mBv +hO/yVvihYFCtnUF1HsqVOYG7p4y/HZEHzRQgYGek5ImPxF8JoONwWiyyHw7lBegn +KMCXnst5xRGBPRBFjJcW9tTf/ts7Sj5FCYOHnPWekQvBU6luyx2SMW5pTRAzSH3r +ufCK1FxHzVf4SkgmAym8wJ6ev7rCP0Pv2GeMg7OFT3gfB3zGNTFonhtraV87FJAs +Vmb3bnJWrFyohTKR8N/3+V4XsF96I+RqSBhOy+geHAHY+E1ll/dOZG7Qt5jiflot +rrtxoDcjFCjDB8NVe1Ex +=70FH -----END PGP SIGNATURE----- diff --git a/net-mail/dovecot/dovecot-2.0.19.ebuild b/net-mail/dovecot/dovecot-2.0.19.ebuild new file mode 100644 index 000000000000..81369748f8ff --- /dev/null +++ b/net-mail/dovecot/dovecot-2.0.19.ebuild @@ -0,0 +1,282 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-2.0.19.ebuild,v 1.12 2012/12/19 08:23:34 eras Exp $ + +EAPI=4 + +inherit eutils versionator ssl-cert user multilib + +MY_P="${P/_/.}" +major_minor="$( get_version_component_range 1-2 )" +sieve_version="0.2.6" +SRC_URI="http://dovecot.org/releases/${major_minor}/${MY_P}.tar.gz + sieve? ( + http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-pigeonhole-${sieve_version}.tar.gz + ) + managesieve? ( + http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-pigeonhole-${sieve_version}.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 MIT" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd" + +IUSE="bzip2 caps cydir sdbox doc ipv6 kerberos ldap +maildir managesieve mbox +mdbox mysql pam postgres selinux sieve sqlite +ssl static-libs suid vpopmail zlib" + +DEPEND="caps? ( sys-libs/libcap ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap ) + mysql? ( virtual/mysql ) + pam? ( virtual/pam ) + postgres? ( dev-db/postgresql-base !dev-db/postgresql-base[ldap,threads] ) + selinux? ( sec-policy/selinux-dovecot ) + sqlite? ( dev-db/sqlite ) + ssl? ( dev-libs/openssl ) + vpopmail? ( net-mail/vpopmail ) + virtual/libiconv" + +RDEPEND="${DEPEND} + >=net-mail/mailbase-0.00-r8" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + if use managesieve && ! use sieve; then + ewarn "managesieve USE flag selected but sieve USE flag unselected" + ewarn "sieve USE flag will be turned on" + fi + + # Add user and group for login process (same as for fedora/redhat) + # default internal user + enewgroup dovecot 97 + enewuser dovecot 97 -1 /dev/null dovecot + # add "mail" group for suid'ing. Better security isolation. + if use suid; then + enewgroup mail + fi + # default login user + enewuser dovenull -1 -1 /dev/null +} + +src_configure() { + local conf="" + + if use postgres || use mysql || use sqlite; then + conf="${conf} --with-sql" + fi + + local storages="" + for storage in cydir sdbox mdbox maildir mbox; do + use ${storage} && storages="${storage} ${storages}" + done + [ "${storages}" ] || storages="maildir" + + # turn valgrind tests off. Bug #340791 + VALGRIND=no econf \ + --localstatedir="${EPREFIX}/var" \ + --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ + $( use_with bzip2 bzlib ) \ + $( use_with caps libcap ) \ + $( use_with kerberos gssapi ) \ + $( use_with ldap ) \ + $( use_with mysql ) \ + $( use_with pam ) \ + $( use_with postgres pgsql ) \ + $( use_with sqlite ) \ + $( use_with ssl ) \ + $( use_with vpopmail ) \ + $( use_with zlib ) \ + $( use_enable static-libs static ) \ + --with-storages="${storages}" \ + --disable-rpath \ + --without-systemdsystemunitdir \ + ${conf} + + if use sieve || use managesieve ; then + # The sieve plugin needs this file to be build to determine the plugin + # directory and the list of libraries to link to. + emake dovecot-config || die "emake dovecot-config failed" + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + econf \ + $( use_enable static-libs static ) \ + --localstatedir="${EPREFIX}/var" \ + --enable-shared \ + --with-dovecot="../${MY_P}" \ + $( use_with managesieve ) + fi +} + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" + + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" + fi +} + +src_test() { + default_src_test + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + default_src_test + fi +} + +src_install () { + emake DESTDIR="${ED}" install + + # insecure: + # use suid && fperms u+s /usr/libexec/dovecot/deliver + # better: + if use suid;then + einfo "Changing perms to allow deliver to be suided" + fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" + fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" + fi + + newinitd "${FILESDIR}"/dovecot.init-r3 dovecot + + rm -rf "${ED}"/usr/share/doc/dovecot + + dodoc AUTHORS NEWS README TODO + dodoc doc/*.{txt,cnf,xml,sh} + docinto example-config + dodoc doc/example-config/*.{conf,ext} + docinto example-config/conf.d + dodoc doc/example-config/conf.d/*.{conf,ext} + docinto wiki + dodoc doc/wiki/* + doman doc/man/*.{1,7} + + # Create the dovecot.conf file from the dovecot-example.conf file that + # the dovecot folks nicely left for us.... + local conf="${ED}/etc/dovecot/dovecot.conf" + local confd="${ED}/etc/dovecot/conf.d" + + insinto /etc/dovecot + doins doc/example-config/*.{conf,ext} + insinto /etc/dovecot/conf.d + doins doc/example-config/conf.d/*.{conf,ext} + fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext + rm -f "${confd}/../README" + + # .maildir is the Gentoo default + local mail_location="maildir:~/.maildir" + if ! use maildir; then + 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|' \ + "${confd}/10-mail.conf" || die "sed failed" + elif use sdbox ; then + mail_location="sdbox:~/.sdbox" + elif use mdbox ; then + mail_location="mdbox:~/.mdbox" + fi + fi + sed -i -e \ + "s|#mail_location =|mail_location = ${mail_location}|" \ + "${confd}/10-mail.conf" \ + || die "failed to update mail location settings in 10-mail.conf" + + # We're using pam files (imap and pop3) provided by mailbase + if use pam; then + sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ + "${confd}/auth-system.conf.ext" \ + || die "failed to update PAM settings in auth-system.conf.ext" + # mailbase does not provide a sieve pam file + use managesieve && dosym imap /etc/pam.d/sieve + sed -i -e \ + 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update PAM settings in 10-auth.conf" + fi + + # Disable ipv6 if necessary + 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 = yes:ssl = yes:' "${confd}/10-ssl.conf" \ + || die "ssl conf failed" + sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ + -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ + "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" + fi + + # Install SQL configuration + if use mysql || use postgres; then + sed -i -e \ + 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ + "${confd}/10-auth.conf" || die "failed to update SQL settings in \ + 10-auth.conf" + fi + + # Install LDAP configuration + if use ldap; then + sed -i -e \ + 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update ldap settings in 10-auth.conf" + fi + + if use vpopmail; then + sed -i -e \ + 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update vpopmail settings in 10-auth.conf" + fi + + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + emake DESTDIR="${ED}" install + sed -i -e \ + 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ + || die "failed to update sieve settings in 15-lda.conf" + rm -rf "${ED}"/usr/share/doc/dovecot + dodoc doc/*.txt + docinto example-config/conf.d + dodoc doc/example-config/conf.d/*.conf + insinto /etc/dovecot/conf.d + doins doc/example-config/conf.d/90-sieve.conf + use managesieve && doins doc/example-config/conf.d/20-managesieve.conf + docinto sieve/rfc + dodoc doc/rfc/*.txt + docinto sieve/devel + dodoc doc/devel/DESIGN + doman doc/man/*.{1,7} + fi + + use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete +} + +pkg_preinst() { + if has_version "<${CATEGORY}/${PN}-2" ; then + elog "There are a lot of changes in configuration files in dovecot-2.0." + elog "Please read http://wiki.dovecot.org/Upgrading and" + elog "check the conf files in ${ROOT}etc/dovecot." + elog "You can also run doveconf -n before running etc-update or" + elog "dispatch-conf to get an idea about what needs to be changed." + ewarn "\nDo NOT {re}start dovecot without checking your conf files" + ewarn "and making the necessary changes.\n" + fi +} + +pkg_postinst() { + 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 + fi + fi +} |