summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2012-05-21 09:45:01 +0000
committerEray Aslan <eras@gentoo.org>2012-05-21 09:45:01 +0000
commit887bcde94efc178e6f2538e31f81bc381c6652a5 (patch)
tree202b6c7bca198644ea9c8380db94df31dd626cbc /mail-mta
parentx86 stable wrt bug #415863 (diff)
downloadhistorical-887bcde94efc178e6f2538e31f81bc381c6652a5.tar.gz
historical-887bcde94efc178e6f2538e31f81bc381c6652a5.tar.bz2
historical-887bcde94efc178e6f2538e31f81bc381c6652a5.zip
version bump
Package-Manager: portage-2.1.10.62/cvs/Linux x86_64
Diffstat (limited to 'mail-mta')
-rw-r--r--mail-mta/postfix/ChangeLog10
-rw-r--r--mail-mta/postfix/Manifest34
-rw-r--r--mail-mta/postfix/postfix-2.7.10.ebuild264
-rw-r--r--mail-mta/postfix/postfix-2.8.11.ebuild279
-rw-r--r--mail-mta/postfix/postfix-2.9.3.ebuild314
5 files changed, 886 insertions, 15 deletions
diff --git a/mail-mta/postfix/ChangeLog b/mail-mta/postfix/ChangeLog
index 27313b604bfa..f4fa9acdc80f 100644
--- a/mail-mta/postfix/ChangeLog
+++ b/mail-mta/postfix/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for mail-mta/postfix
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.360 2012/05/21 09:18:38 eras Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.361 2012/05/21 09:45:01 eras Exp $
+
+*postfix-2.9.3 (21 May 2012)
+*postfix-2.8.11 (21 May 2012)
+*postfix-2.7.10 (21 May 2012)
+
+ 21 May 2012; Eray Aslan <eras@gentoo.org> +postfix-2.7.10.ebuild,
+ +postfix-2.8.11.ebuild, +postfix-2.9.3.ebuild:
+ version bump
*postfix-2.10_pre20120520 (21 May 2012)
diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
index 91397de79cce..d03c563e19ed 100644
--- a/mail-mta/postfix/Manifest
+++ b/mail-mta/postfix/Manifest
@@ -8,6 +8,7 @@ AUX postfix_no-berkdb.patch 2729 RMD160 2e80e5c446b58afe8cda35991ac3af5f3db3f7eb
AUX smtp.pass 141 RMD160 799433a4ee9e9e32f20aa2d31f85f33faa2bc7e6 SHA1 e1d75aa259fa07b257a617e056662aecfd19957f SHA256 c9b3b56a8df2367cc15bc43a70304fac7ebdd7697e1d450d1bcb4bfdd3e078e9
AUX smtp.sasl 147 RMD160 8565ca413ec1a9e369be227643d3610124b34566 SHA1 565035b230d4997a207d146609336dfe643c6ed3 SHA256 0ef6a2a7846498f56b9a8879f561a51c1e3a203ba90b2991d499afa69fd85629
DIST postfix-2.10-20120520.tar.gz 3775212 RMD160 5b34aff06afac042e4987f3fe6b69638c15d5116 SHA1 d56ded5f1c153c12fbcfed9229e5e9d204bc2ec5 SHA256 4ca927f8a1932080a5c87e4babd5b024c5ca45c3572c6d51c64e5f9fb4ed3305
+DIST postfix-2.7.10.tar.gz 3418495 RMD160 b2a42fd2316f71bd04b5fbe113c722ab3be06def SHA1 5a1b087454dc4560076cb4bc2fb2e4c45519e416 SHA256 1e64c844dddb5a8f0c7cec2547104c6e549ae4111983ffe9b4251c8c00ada98b
DIST postfix-2.7.4.tar.gz 3423968 RMD160 4f3e0db43c55cd50b3fb4493dbc698ff3f343294 SHA1 c755ceb3a5ee983f3b72f08e1fffb6384b1f1865 SHA256 9bad5851e8a7c97890ee9465e7f675f7826d56361369d3e792a79eaf98ed2b11
DIST postfix-2.7.5.tar.gz 3425071 RMD160 a900ff09c0a54382a4af62b609f6ddaba17963fc SHA1 066cc87f602f2daf1d3207de92ca08de9eb16bab SHA256 2fe408f49bc8540bc41b44f1b7ee7a27561f1baa4e25ef55645778ba96d15932
DIST postfix-2.7.6.tar.gz 3425286 RMD160 9961b959ae34a1fe1d3bf70acce1f16e5ada255d SHA1 9a2cd652abdc0d3cf29563261d5c0f407d8d7bf9 SHA256 4f7546d25463c5fc300eccd05c302a44458b1cc8dfda02c7205daa0038d5ab17
@@ -15,11 +16,13 @@ DIST postfix-2.7.7.tar.gz 3425665 RMD160 08edab5dabb4b54e3b3f903df51a93e4718e561
DIST postfix-2.7.8.tar.gz 3426172 RMD160 75429e725399ea101f18a272a595e6564ad2ef11 SHA1 d592020a3df89bb4f3be5d3bb67c1df34bbad112 SHA256 7fa1df2c7422df08e88ce2837e6389b8f8fd7f9c007d956e43775b1c6acaaadf
DIST postfix-2.7.9.tar.gz 3418820 RMD160 fd71c197a2ec37b5a358eea57373c331035d3512 SHA1 5c01360f0fdada41484716221ec0d6a59780b6ef SHA256 f818f29e6e3c59ec0ce8cf0fe0437845fb1f87af1ec4d7276c80c04dfe2dda92
DIST postfix-2.8.10.tar.gz 3640084 RMD160 5bbf698988ba491ba2ce3937918381be9fc2e3d7 SHA1 1a206b13e42e8581733046af8283a54ca0c30657 SHA256 2984005ca77457992b133eefc16f788e1eacd2c10b7626678bd24a53240ad3f2
+DIST postfix-2.8.11.tar.gz 3641059 RMD160 be7298527b7cde5105f20a298953b5e3a05b40f1 SHA1 65f15d213d9a92ef1cefdb36710e81b8fbfc13fc SHA256 15997ff5c9a9cd95dd381c3faa1a0d4812a158c14eab229e8f81fd7b5dbfcac4
DIST postfix-2.8.7.tar.gz 3647643 RMD160 ab0700f8f340fad11bf2a294a36ff1d70a1a8783 SHA1 81c87aceff4d9af67a304354bab9c99ac98fc8a0 SHA256 5c13465ab47414e9aa2e857851eff1a3f020cebd056e0dde6094ece3552806e5
DIST postfix-2.8.8.tar.gz 3648317 RMD160 eb71b542af2a00da5f12220946731560ff20377d SHA1 b712b25a105c132b40b63aef49268ea117b86f03 SHA256 77dc98e21da48901d326e98f918ea50d6cad66ee5812033b5aab342c9578328c
DIST postfix-2.8.9.tar.gz 3648498 RMD160 db540c199ca66457e0ca65b1f95c9745249a1254 SHA1 2404d369e7ae90cdd9a0e4e185c4699a16c9fe81 SHA256 6a63bafad1002abbab2d2592a40dc4b3e35defd97f2026d6ccc398e5d7ee9bf3
DIST postfix-2.9.1.tar.gz 3768329 RMD160 5a97bcfe16a5ed343e449e73cde99c62b47c4aeb SHA1 d4f6572ab1ac5fc15626ac2de6d18c340aae2cef SHA256 d1dbe901f76ab6fd51f9c8c61eb46bd6fe0bc8b13823330e397eb1b00e940cbe
DIST postfix-2.9.2.tar.gz 3759595 RMD160 512fb6fcb42d628b14a7153f3a5f2e03b7b6a8c6 SHA1 fda7ec5ac79300577f61a68561171bd501b1b20c SHA256 ed66f5406056267ce21dbf48c6f4e3b53bf8fad46d799d314445353f42b5c902
+DIST postfix-2.9.3.tar.gz 3760555 RMD160 1bf72415eef14ea2bb0717be92491f99e48a81a8 SHA1 fd6c1ba3bbceb1a29b95655a742a2c547e11ca1d SHA256 3b4ae6d7715ccd23396d83a65ad83c7639065a125c87393013cc0514186a55da
DIST postfix-vda-2.7.2.patch 59667 RMD160 ebec1fa4a4c6b3c0160407b09aacf8357c936148 SHA1 ac712922f45856965118fa7b8551ece1ccb524db SHA256 f9b12376983833ef9305f7696e9792b62058f242ff2630aeb0866cf686f0a14b
DIST postfix-vda-v10-2.7.8.patch 56777 RMD160 7ba4611edd5a63c9378b96043c3e9e2e8b520cfa SHA1 b1079f1a2a4d81bfb59d94ae44f888d2e7df2c02 SHA256 10738a30f2cb00cd05c593caf5b4b9d4ca44927432c1995a9db5c3557d0528db
DIST postfix-vda-v10-2.8.5.patch 56777 RMD160 fc1622a91c88d6d91782b9d4e9dfecd3f603251b SHA1 b9f8480a738dccf0023698274c8d5f5cb4fb308f SHA256 0106e0bfdea8bb3888e8f33e7cb4b1530d171abbf2d3ac91567f91240e4b6b5a
@@ -27,6 +30,7 @@ DIST postfix-vda-v10-2.8.8.patch 56777 RMD160 960d5b2e6ff45ae376ba9e98ab74ec712b
DIST postfix-vda-v10-2.8.9.patch 56777 RMD160 acf05f56f1dfb7f4628c7b95be92cabc41538b5e SHA1 8e55e2fea8392f2e64e05e9cd84c712cc489031c SHA256 e671f7349173349d66f1b091359761ed5a5d517f8a58c86a42ff461997d2cd7e
DIST postfix-vda-v11-2.9.1.patch 55009 RMD160 fc35876f4c48accca785f412a4d9a2f1a250f05d SHA1 f259c489d76271ac1780510e20a60962f97ac36f SHA256 611283a932577944bcdde36e5fe1a80ca750a0a66eb5f3490666e2adafd2bf84
EBUILD postfix-2.10_pre20120520.ebuild 9485 RMD160 34beec9009ec35c454b5c8c9788a7f76ba87615e SHA1 6e069a11f8d75df3a6439aa221389430e362ae44 SHA256 511768904f36c2abff3a9696bca75512b8be81e7fd12394ca6608377863b7cfa
+EBUILD postfix-2.7.10.ebuild 7578 RMD160 9cbed3cf96605b2f0fdc8dfc0cfbcf27b36fefc2 SHA1 257c73746507f32a99ddd7c34ca72905b99e1146 SHA256 d38ec2fe9515b789b5a91d35b12cba3daefcc932b64469bd9801cc5708d942cf
EBUILD postfix-2.7.4.ebuild 7562 RMD160 7b1874aa1c5fb0357ab8bafd740e38ec00ecdb45 SHA1 db22462d85927f3afc7c172597842d1fc0ac5fb5 SHA256 aaa33b10ecc21d9dcd8256b12974912bf3481544c5f7cb5119da7b52fcefc9d9
EBUILD postfix-2.7.5.ebuild 7573 RMD160 767bf6a470af95a14e1e725fc77287d3f3907ffd SHA1 2f897791234a3c2bfbcb3fe39406c60e2f7e9b09 SHA256 b348d000438cae031fa48e04a938aa623dd722120699a9969cccc99d05842122
EBUILD postfix-2.7.6.ebuild 7573 RMD160 6e8c3b59101d7d4d19f20f0df24b5f53d2a23957 SHA1 f703ec9a31a1a6a2e3930fbd7660f998d1753c27 SHA256 7ade993dbeba99be1ab0f97d35227fbb0d208f70e4a718bf3d2a56bc4983f512
@@ -34,6 +38,7 @@ EBUILD postfix-2.7.7.ebuild 7573 RMD160 cda7e8659a726c4a7e12b76ada5711ceb952c18b
EBUILD postfix-2.7.8.ebuild 7577 RMD160 a459e92a184db3b90cbffcdc11c73e0dc6cb7efc SHA1 9702c2016b0f1e462b8976357efe21faf52993d1 SHA256 5ece1b4032d80b7f2fef8967bd48cd3a96329c5aa3acb92403f45a0ae804ffdc
EBUILD postfix-2.7.9.ebuild 7577 RMD160 db3ec2b341bb3710d3d27024afafa4c85b453b76 SHA1 a442bb2cf3861905148946c4f6e25732f353db93 SHA256 0ccc0356766205ff63e8d99efee651f8ceffaf6afc823e3f1a87ab405117c873
EBUILD postfix-2.8.10.ebuild 8426 RMD160 9375bde8664a2a529920954fc51b808f70f22d25 SHA1 d6e0b41ece51ca8063bac57a4121e36b4f05734b SHA256 c54593dc1b5e0d4d55b1099641a8ef9d03e3ff53efc4418b8cd35f7fac96cfc7
+EBUILD postfix-2.8.11.ebuild 8426 RMD160 4665275b3802a1160915d918397afcfaa85345d2 SHA1 b2472b5159283122c440fb83c49dc25a21f07e19 SHA256 96d7ca017193cf88f398e03d8cb9df2974f5998734d55df0aa1e603454f5ed94
EBUILD postfix-2.8.7.ebuild 8415 RMD160 136befb1c8c0adbd312ab11439b5761d24e87cd0 SHA1 4d0f4a654ea5cbb03dc7db2611c0fb788705f677 SHA256 969f07e8ae3206416527132d8669a114380d3c1b1e12c05cfafffde11da2df9e
EBUILD postfix-2.8.8.ebuild 8425 RMD160 74c826a0bf5894414b9e1355df6f1e5e3d266563 SHA1 9985a6edbd660eaff9c51b014f1c0ab32239d314 SHA256 278137f08438a5ccbf1b358231b60e4a99b0e3d956760c8d64993ba753614ac6
EBUILD postfix-2.8.9.ebuild 8421 RMD160 eaf58ec7a084e0968015ed6d951979e3015b5cd6 SHA1 f073b918024bbe641fc6b43a09bc24344322d6ec SHA256 5ef2c0f40d0285199c4de479eb445c90415843091a974b7af58415d5ae11d500
@@ -41,22 +46,23 @@ EBUILD postfix-2.9.1-r1.ebuild 9478 RMD160 0a6d67f3f63f7e9825e40712f88c481e7b706
EBUILD postfix-2.9.1-r2.ebuild 9478 RMD160 d1b1539b14bbbc2ba65f2362275378884ed13b87 SHA1 6e18ad0d82f9ff405512582326a9709f7c43e5be SHA256 c45282bf90f29ee86e97095728b303b2bfcccfe6f24b05ea688ec1355965d315
EBUILD postfix-2.9.1.ebuild 9475 RMD160 97123ce49c257cf0368e741a57190e9a66c24605 SHA1 5573f8ffe9a33295351882aa4793e8b3bddec90d SHA256 2cb3fdf02182f937503737345ecafb7eb851871dfb49e215cea86ee16baff2f8
EBUILD postfix-2.9.2.ebuild 9475 RMD160 b6db483bcfab74233d7025d5ae40255c0f8b6273 SHA1 4387c9d057435fbfa2dd3632a44427fe0289b0f3 SHA256 756056225635705d5d70c1b038e31fd7c2e5ee4d8c8efdba34f738ffa7515fe2
-MISC ChangeLog 81759 RMD160 f6b7efa17e7f5f03f000d908afff58d6a8e89857 SHA1 3f6688a3c8cf815e24e004f745903c0fd00750cc SHA256 aed75254aba5973d0f969ea3dbb57c32bc9714156cce6b53f50cb4781ae5adbe
+EBUILD postfix-2.9.3.ebuild 9475 RMD160 60c3ab69869eea63c5ab093455ef466983db64ad SHA1 cbf5feb2ddac3f087deb6c2664f713a4454b57ce SHA256 acd37ee818b1c05dfcd2b76b3b9a294b602947b7424aefbe868f15c1d61dc202
+MISC ChangeLog 81982 RMD160 8e8cefdf6c639952653654f9d9a861cbb7bb15a0 SHA1 4540507d963b3953c1b6670088b56f8192ba729d SHA256 429e0f22327b71b8d5fb8c4459d598e7e5efd9debe3de5bc681da0d2c0ad36f5
MISC metadata.xml 610 RMD160 095d8cd529350f58c64d6d2eb40e8534d3dddfae SHA1 d53048933e7490f3f342ccf8972c191ee8030ccd SHA256 00b7ef524664b20a9df7642573745b1d17b0b51f005ffd150ac6dccba38dee88
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQIcBAEBCAAGBQJPughzAAoJEHfx8XVYajsf3FkP/iDh9bOs54wuO3UUxOLG+ykG
-0NKDYnuyHaP4v9yMCwpVOdGlqnrvLfpYWOfLniLeI+5CMwrbWj7nY6u7e5ZZyGCk
-/xbIIWziEqw1gL1wB9kfISUKGqVP9xxE410HR6hX8rkGnszeiyIRJ7wjs5mH+ibi
-2Bs29QKrVS9dI4YwX8Epeu73viiPIaH/f3uFzUj7qKluDWKKtKWAUcLtunU+4wjs
-3/Hj+Qzbs8/51M2VGuqFH7JELV6cs55oeFw+HRvfrVwmbyAHwVL9UEz07zV07rZ2
-vcPvDitFLi6vmtdbqtgtUpSlDmrQZBW0BM3LkiDxRwP5ZRA6vsU/PM6HDZ7wEaZY
-j1ZBF8Wjjxo4XDWeiUN9JmyzDvzgOQTXndL6wjJuNj7csnjq4qWVCBWl01sKL1iJ
-MtrypTz7RuoPVd95FKs3UwwbjwbkfhZSfeFw7A/vNlbx2Gl4ZB+GHweShQPbxax/
-6RNCNJcJO/a/dtq4B+T6yHdA/ZevjzFWGA4Y/zQvT1CzuPqSsaTXuOcKLCmILu3L
-l6yY3sE1n0gillmi3FAuspjpDniuqJLVas4ILDBCiDVm8YtYwyTWMB2pwNGo/JYl
-CuF1iYs4qlBnhsB12aUVGDMhEibokTS9q5fTOi64obWSc0shxjULkdpZ5N++RIbR
-UJ7zV2ZzVG2zwiEguHa8
-=msvR
+iQIcBAEBCAAGBQJPug6iAAoJEHfx8XVYajsfs7oP+gL4/1UJPb18niMDfShpWsDX
+TJ3Tsnno31xybe3qL2gCw9zcwlKAJT1iw3kC92bVo3UTE6f5M5glnUkH3H+iyJ/0
+Ew/VQeK9WEayFfWafYi8p2luJrKxxQhHmvDzpfkCxfabZ/QjKTff2I6dTSWexnP6
+e4Z3JcBCx3bzDTod/JY3/i1pH0pc0/0AkBfGeeejVQ683s4+td/bWUy21tvAq/4B
+JK0LvvCQaRqYn9jfzWcsTv2EcHEh4nFjIddoXNEeVwHjbYkHUPrnvSgaSe7XToNV
+SuuSHYMpc/vkJ/XKELbuEHkq1crK5lEFNNHobFHD7sxiPOCDKaMG702oWJTXAI1L
+zpiLDEgKb8AD91RXMHJ/Ua80v3ouQUYBGDVqbSd+L6TFxMXUNHSEygNMx5US9tBj
+krlNebrF64E9AQZGRcrjNihdAPticd/8CwP25aub+aJQrJsAtVb761l6YY2roOwN
+1RE/XlSu704I43+eW0OIGxgsdHKzBO0wtB5pIsEX0aCft0spoxNSTAX62qTn6Vi9
+RSQFLmrqAJymdsgfi72O3U/fyU7//D5qz05t3D1OJewz4ztdFkpxUvZn5mnTe/2l
+4I9Rm7zcJVdP8/DgA/DSxCQbyso4TIyx/jfEfqOy6tCrN5ynZ/FEx1/X2+kSxeTQ
+ujHTTf1iMn+2vnVYyLfV
+=jldw
-----END PGP SIGNATURE-----
diff --git a/mail-mta/postfix/postfix-2.7.10.ebuild b/mail-mta/postfix/postfix-2.7.10.ebuild
new file mode 100644
index 000000000000..da6c63d13c05
--- /dev/null
+++ b/mail-mta/postfix/postfix-2.7.10.ebuild
@@ -0,0 +1,264 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.7.10.ebuild,v 1.1 2012/05/21 09:45:01 eras Exp $
+
+EAPI=3
+
+inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam
+
+MY_PV="${PV/_rc/-RC}"
+MY_SRC="${PN}-${MY_PV}"
+MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
+VDA_PV="2.7.8"
+VDA_P="${PN}-vda-v10-${VDA_PV}"
+RC_VER="2.5"
+
+DESCRIPTION="A fast and secure drop-in replacement for sendmail."
+HOMEPAGE="http://www.postfix.org/"
+SRC_URI="${MY_URI}/${MY_SRC}.tar.gz
+ vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) "
+
+LICENSE="IBM"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="cdb doc dovecot-sasl examples hardened ipv6 ldap mbox mysql nis pam postgres sasl selinux ssl vda"
+
+DEPEND=">=sys-libs/db-3.2
+ >=dev-libs/libpcre-3.4
+ cdb? ( || ( >=dev-db/cdb-0.75-r1 >=dev-db/tinycdb-0.76 ) )
+ ldap? ( >=net-nds/openldap-1.2 )
+ mysql? ( virtual/mysql )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql-base )
+ sasl? ( >=dev-libs/cyrus-sasl-2 )
+ ssl? ( >=dev-libs/openssl-0.9.6g )"
+
+RDEPEND="${DEPEND}
+ net-mail/mailbase
+ selinux? ( sec-policy/selinux-postfix )
+ !mail-mta/courier
+ !mail-mta/esmtp
+ !mail-mta/exim
+ !mail-mta/mini-qmail
+ !mail-mta/msmtp[mta]
+ !mail-mta/nbsmtp
+ !mail-mta/netqmail
+ !mail-mta/nullmailer
+ !mail-mta/qmail-ldap
+ !mail-mta/sendmail
+ !<mail-mta/ssmtp-2.64-r2
+ !>=mail-mta/ssmtp-2.64-r2[mta]
+ !net-mail/fastforward"
+
+S="${WORKDIR}/${MY_SRC}"
+
+group_user_check() {
+ einfo "Checking for postfix group ..."
+ enewgroup postfix 207
+ einfo "Checking for postdrop group ..."
+ enewgroup postdrop 208
+ einfo "Checking for postfix user ..."
+ enewuser postfix 207 -1 /var/spool/postfix postfix,mail
+}
+
+pkg_setup() {
+ # Add postfix, postdrop user/group (bug #77565)
+ group_user_check || die "Failed to check/add needed user/group"
+}
+
+src_prepare() {
+ if use vda ; then
+ epatch "${DISTDIR}"/${VDA_P}.patch
+ fi
+
+ sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
+ src/util/sys_defs.h || die "sed failed"
+
+ # change default paths to better comply with portage standard paths
+ sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
+}
+
+src_configure() {
+ # Make sure LDFLAGS get passed down to the executables.
+ local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread"
+
+ use pam && mylibs="${mylibs} -lpam"
+
+ if use ldap ; then
+ mycc="${mycc} -DHAS_LDAP"
+ mylibs="${mylibs} -lldap -llber"
+ fi
+
+ if use mysql ; then
+ mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
+ mylibs="${mylibs} $(mysql_config --libs)"
+ fi
+
+ if use postgres ; then
+ mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
+ mylibs="${mylibs} -lpq -L$(pg_config --libdir)"
+ fi
+
+ if use ssl ; then
+ mycc="${mycc} -DUSE_TLS"
+ mylibs="${mylibs} -lssl -lcrypto"
+ fi
+
+ if use sasl ; then
+ if use dovecot-sasl ; then
+ # Set dovecot as default.
+ mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
+ fi
+ mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
+ mylibs="${mylibs} -lsasl2"
+ elif use dovecot-sasl ; then
+ mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
+ fi
+
+ if ! use nis ; then
+ sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \
+ src/util/sys_defs.h || die "sed failed"
+ fi
+
+ if use cdb ; then
+ mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
+ CDB_LIBS=""
+
+ # Tinycdb is preferred.
+ if has_version dev-db/tinycdb ; then
+ einfo "Building with dev-db/tinycdb"
+ CDB_LIBS="-lcdb"
+ else
+ einfo "Building with dev-db/cdb"
+ CDB_PATH="/usr/$(get_libdir)"
+ for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
+ CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
+ done
+ fi
+
+ mylibs="${mylibs} ${CDB_LIBS}"
+ fi
+
+ mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\""
+
+ # Robin H. Johnson <robbat2@gentoo.org> 17/Nov/2006
+ # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
+ mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
+ filter-lfs-flags
+
+ # Workaround for bug #76512
+ if use hardened ; then
+ [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
+ fi
+
+ emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
+ makefiles || die "configure problem"
+}
+
+src_install () {
+ local myconf
+ use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
+ html_directory=\"/usr/share/doc/${PF}/html\""
+
+ /bin/sh postfix-install \
+ -non-interactive \
+ install_root="${D}" \
+ config_directory="/usr/share/doc/${PF}/defaults" \
+ manpage_directory="/usr/share/man" \
+ ${myconf} \
+ || die "postfix-install failed"
+
+ # Fix spool removal on upgrade
+ rm -Rf "${D}"/var
+ keepdir /var/spool/postfix
+
+ # Install rmail for UUCP, closes bug #19127
+ dobin auxiliary/rmail/rmail
+
+ # Provide another link for legacy FSH
+ dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
+
+ # Install qshape tool
+ dobin auxiliary/qshape/qshape.pl
+ doman man/man1/qshape.1
+
+ # Performance tuning tools and their manuals
+ dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
+ doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
+
+ # Set proper permissions on required files/directories
+ dodir /var/lib/postfix
+ keepdir /var/lib/postfix
+ fowners postfix:postfix /var/lib/postfix
+ fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
+ fperms 0750 /var/lib/postfix
+ fowners root:postdrop /usr/sbin/post{drop,queue}
+ fperms 02711 /usr/sbin/post{drop,queue}
+
+ keepdir /etc/postfix
+ mv "${D}"/usr/share/doc/${PF}/defaults/*.cf "${D}"/etc/postfix
+ if use mbox ; then
+ mypostconf="mail_spool_directory=/var/spool/mail"
+ else
+ mypostconf="home_mailbox=.maildir/"
+ fi
+ "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
+ -e ${mypostconf} || die "postconf failed"
+
+ insinto /etc/postfix
+ newins "${FILESDIR}"/smtp.pass saslpass
+ fperms 600 /etc/postfix/saslpass
+
+ newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix || die "newinitd failed"
+
+ use examples && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
+
+ dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
+
+ pamd_mimic_system smtp auth account
+
+ if use sasl ; then
+ insinto /etc/sasl2
+ newins "${FILESDIR}"/smtp.sasl smtpd.conf
+ fi
+
+ # Remove unnecessary files
+ rm -f "${D}"/usr/$(get_libdir)/postfix/*.cf
+}
+
+pkg_postinst() {
+ # Add postfix, postdrop user/group (bug #77565)
+ group_user_check || die "Failed to check/add needed user/group"
+
+ # Do not install server.{key,pem) SSL certificates if they already exist
+ if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
+ && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
+ install_cert /etc/ssl/postfix/server
+ chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
+ fi
+
+ ebegin "Fixing queue directories and permissions"
+ "${ROOT}"/usr/$(get_libdir)/postfix/post-install upgrade-permissions \
+ daemon_directory="${ROOT}/usr/$(get_libdir)/postfix"
+
+ if [[ ! -e /etc/mail/aliases.db ]] ; then
+ ewarn
+ ewarn "You must edit /etc/mail/aliases to suit your needs"
+ ewarn "and then run /usr/bin/newaliases. Postfix will not"
+ ewarn "work correctly without it."
+ ewarn
+ fi
+
+ if [[ -e /etc/mailer.conf ]] ; then
+ einfo
+ einfo "mailwrapper support is discontinued."
+ einfo "You may want to 'emerge -C mailwrapper' now."
+ einfo
+ fi
+
+ elog
+ elog "See the RELEASE_NOTES file in /usr/share/doc/${PF}"
+ elog "for incompatibilities and other major changes between releases."
+ elog
+}
diff --git a/mail-mta/postfix/postfix-2.8.11.ebuild b/mail-mta/postfix/postfix-2.8.11.ebuild
new file mode 100644
index 000000000000..4e85745a646b
--- /dev/null
+++ b/mail-mta/postfix/postfix-2.8.11.ebuild
@@ -0,0 +1,279 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.8.11.ebuild,v 1.1 2012/05/21 09:45:01 eras Exp $
+
+EAPI=4
+
+inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam
+
+MY_PV="${PV/_rc/-RC}"
+MY_SRC="${PN}-${MY_PV}"
+MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
+VDA_PV="2.8.9"
+VDA_P="${PN}-vda-v10-${VDA_PV}"
+RC_VER="2.5"
+
+DESCRIPTION="A fast and secure drop-in replacement for sendmail."
+HOMEPAGE="http://www.postfix.org/"
+SRC_URI="${MY_URI}/${MY_SRC}.tar.gz
+ vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) "
+
+LICENSE="IBM"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="cdb doc dovecot-sasl hardened ipv6 ldap ldap-bind mbox mysql nis pam postgres sasl selinux sqlite ssl vda"
+
+DEPEND=">=sys-libs/db-3.2
+ >=dev-libs/libpcre-3.4
+ dev-lang/perl
+ cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) )
+ ldap? ( net-nds/openldap )
+ ldap-bind? ( net-nds/openldap[sasl] )
+ mysql? ( virtual/mysql )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql-base )
+ sasl? ( >=dev-libs/cyrus-sasl-2 )
+ sqlite? ( dev-db/sqlite:3 )
+ ssl? ( >=dev-libs/openssl-0.9.6g )"
+
+RDEPEND="${DEPEND}
+ dovecot-sasl? ( net-mail/dovecot )
+ net-mail/mailbase
+ selinux? ( sec-policy/selinux-postfix )
+ !mail-mta/courier
+ !mail-mta/esmtp
+ !mail-mta/exim
+ !mail-mta/mini-qmail
+ !mail-mta/msmtp[mta]
+ !mail-mta/nbsmtp
+ !mail-mta/netqmail
+ !mail-mta/nullmailer
+ !mail-mta/qmail-ldap
+ !mail-mta/sendmail
+ !<mail-mta/ssmtp-2.64-r2
+ !>=mail-mta/ssmtp-2.64-r2[mta]
+ !net-mail/fastforward"
+
+REQUIRED_USE="ldap-bind? ( ldap sasl )"
+
+S="${WORKDIR}/${MY_SRC}"
+
+group_user_check() {
+ einfo "Checking for postfix group ..."
+ enewgroup postfix 207
+ einfo "Checking for postdrop group ..."
+ enewgroup postdrop 208
+ einfo "Checking for postfix user ..."
+ enewuser postfix 207 -1 /var/spool/postfix postfix,mail
+}
+
+pkg_setup() {
+ # Add postfix, postdrop user/group (bug #77565)
+ group_user_check || die "Failed to check/add needed user/group"
+}
+
+src_prepare() {
+ if use vda ; then
+ epatch "${DISTDIR}"/${VDA_P}.patch
+ fi
+
+ sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
+ src/util/sys_defs.h || die "sed failed"
+
+ # change default paths to better comply with portage standard paths
+ sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
+}
+
+src_configure() {
+ # Make sure LDFLAGS get passed down to the executables.
+ local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread"
+
+ use pam && mylibs="${mylibs} -lpam"
+
+ if use ldap ; then
+ mycc="${mycc} -DHAS_LDAP"
+ mylibs="${mylibs} -lldap -llber"
+ fi
+
+ if use mysql ; then
+ mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
+ mylibs="${mylibs} $(mysql_config --libs)"
+ fi
+
+ if use postgres ; then
+ mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
+ mylibs="${mylibs} -lpq -L$(pg_config --libdir)"
+ fi
+
+ if use sqlite ; then
+ mycc="${mycc} -DHAS_SQLITE"
+ mylibs="${mylibs} -lsqlite3"
+ fi
+
+ if use ssl ; then
+ mycc="${mycc} -DUSE_TLS"
+ mylibs="${mylibs} -lssl -lcrypto"
+ fi
+
+ if use sasl ; then
+ if use dovecot-sasl ; then
+ # Set dovecot as default.
+ mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
+ fi
+ if use ldap-bind ; then
+ mycc="${mycc} -DUSE_LDAP_SASL"
+ fi
+ mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
+ mylibs="${mylibs} -lsasl2"
+ elif use dovecot-sasl ; then
+ mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
+ fi
+
+ if ! use nis ; then
+ sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \
+ src/util/sys_defs.h || die "sed failed"
+ fi
+
+ if use cdb ; then
+ mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
+ CDB_LIBS=""
+
+ # Tinycdb is preferred.
+ if has_version dev-db/tinycdb ; then
+ einfo "Building with dev-db/tinycdb"
+ CDB_LIBS="-lcdb"
+ else
+ einfo "Building with dev-db/cdb"
+ CDB_PATH="/usr/$(get_libdir)"
+ for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
+ CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
+ done
+ fi
+
+ mylibs="${mylibs} ${CDB_LIBS}"
+ fi
+
+ mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\""
+ mycc="${mycc} -DDEF_CONFIG_DIR=\\\"/etc/postfix\\\""
+ mycc="${mycc} -DDEF_COMMAND_DIR=\\\"/usr/sbin\\\""
+ mycc="${mycc} -DDEF_SENDMAIL_PATH=\\\"/usr/sbin/sendmail\\\""
+ mycc="${mycc} -DDEF_NEWALIS_PATH=\\\"/usr/bin/newaliases\\\""
+ mycc="${mycc} -DDEF_MAILQ_PATH=\\\"/usr/bin/mailq\\\""
+ mycc="${mycc} -DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\""
+ mycc="${mycc} -DDEF_README_DIR=\\\"/usr/share/doc/${PF}/readme\\\""
+ mycc="${mycc} -DDEF_HTML_DIR=\\\"/usr/share/doc/${PF}/html\\\""
+ mycc="${mycc} -DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\""
+ mycc="${mycc} -DDEF_DATA_DIR=\\\"/var/lib/postfix\\\""
+ mycc="${mycc} -DDEF_MAIL_OWNER=\\\"postfix\\\""
+ mycc="${mycc} -DDEF_SGID_GROUP=\\\"postdrop\\\""
+
+ # Robin H. Johnson <robbat2@gentoo.org> 17/Nov/2006
+ # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
+ mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
+ filter-lfs-flags
+
+ # Workaround for bug #76512
+ if use hardened ; then
+ [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
+ fi
+
+ emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles
+}
+
+src_install () {
+ /bin/sh postfix-install \
+ -non-interactive \
+ install_root="${D}" \
+ config_directory="/etc/postfix" \
+ manpage_directory="/usr/share/man" \
+ readme_directory="/usr/share/doc/${PF}/readme" \
+ html_directory="/usr/share/doc/${PF}/html" \
+ command_directory="/usr/sbin" \
+ daemon_directory="/usr/$(get_libdir)/postfix" \
+ mailq_path="/usr/bin/mailq" \
+ newaliases_path="/usr/bin/newaliases" \
+ sendmail_path="/usr/sbin/sendmail" \
+ || die "postfix-install failed"
+
+ # Fix spool removal on upgrade
+ rm -Rf "${D}"/var
+ keepdir /var/spool/postfix
+
+ # Install rmail for UUCP, closes bug #19127
+ dobin auxiliary/rmail/rmail
+
+ # Provide another link for legacy FSH
+ dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
+
+ # Install qshape tool
+ dobin auxiliary/qshape/qshape.pl
+ doman man/man1/qshape.1
+
+ # Performance tuning tools and their manuals
+ dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
+ doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
+
+ # Set proper permissions on required files/directories
+ dodir /var/lib/postfix
+ keepdir /var/lib/postfix
+ fowners postfix:postfix /var/lib/postfix
+ fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
+ fperms 0750 /var/lib/postfix
+ fowners root:postdrop /usr/sbin/post{drop,queue}
+ fperms 02711 /usr/sbin/post{drop,queue}
+
+ keepdir /etc/postfix
+ if use mbox ; then
+ mypostconf="mail_spool_directory=/var/spool/mail"
+ else
+ mypostconf="home_mailbox=.maildir/"
+ fi
+ "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
+ -e ${mypostconf} || die "postconf failed"
+
+ insinto /etc/postfix
+ newins "${FILESDIR}"/smtp.pass saslpass
+ fperms 600 /etc/postfix/saslpass
+
+ newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
+ # bug #359913
+ use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
+ use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
+
+ dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
+
+ mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
+ mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
+
+ pamd_mimic_system smtp auth account
+
+ if use sasl ; then
+ insinto /etc/sasl2
+ newins "${FILESDIR}"/smtp.sasl smtpd.conf
+ fi
+
+ # Remove unnecessary files
+ rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
+ rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
+}
+
+pkg_postinst() {
+ # Do not install server.{key,pem) SSL certificates if they already exist
+ if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
+ && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
+ install_cert /etc/ssl/postfix/server
+ chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
+ fi
+
+ if [[ ! -e /etc/mail/aliases.db ]] ; then
+ ewarn
+ ewarn "You must edit /etc/mail/aliases to suit your needs"
+ ewarn "and then run /usr/bin/newaliases. Postfix will not"
+ ewarn "work correctly without it."
+ ewarn
+ fi
+
+ elog "See the RELEASE_NOTES file in /usr/share/doc/${PF}"
+ elog "for incompatibilities and other major changes between releases."
+}
diff --git a/mail-mta/postfix/postfix-2.9.3.ebuild b/mail-mta/postfix/postfix-2.9.3.ebuild
new file mode 100644
index 000000000000..12979e7ff8cf
--- /dev/null
+++ b/mail-mta/postfix/postfix-2.9.3.ebuild
@@ -0,0 +1,314 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.9.3.ebuild,v 1.1 2012/05/21 09:45:01 eras Exp $
+
+EAPI=4
+
+inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam versionator
+
+MY_PV="${PV/_rc/-RC}"
+MY_SRC="${PN}-${MY_PV}"
+MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
+VDA_PV="2.9.1"
+VDA_P="${PN}-vda-v11-${VDA_PV}"
+RC_VER="2.7"
+
+DESCRIPTION="A fast and secure drop-in replacement for sendmail."
+HOMEPAGE="http://www.postfix.org/"
+SRC_URI="${MY_URI}/${MY_SRC}.tar.gz
+ vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) "
+
+LICENSE="IBM"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="+berkdb cdb doc dovecot-sasl hardened ldap ldap-bind memcached mbox mysql nis pam postgres sasl selinux sqlite ssl vda"
+
+DEPEND=">=dev-libs/libpcre-3.4
+ dev-lang/perl
+ berkdb? ( >=sys-libs/db-3.2 )
+ cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) )
+ ldap? ( net-nds/openldap )
+ ldap-bind? ( net-nds/openldap[sasl] )
+ mysql? ( virtual/mysql )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql-base )
+ sasl? ( >=dev-libs/cyrus-sasl-2 )
+ sqlite? ( dev-db/sqlite:3 )
+ ssl? ( >=dev-libs/openssl-0.9.6g )"
+
+RDEPEND="${DEPEND}
+ dovecot-sasl? ( net-mail/dovecot )
+ memcached? ( net-misc/memcached )
+ net-mail/mailbase
+ selinux? ( sec-policy/selinux-postfix )
+ !mail-mta/courier
+ !mail-mta/esmtp
+ !mail-mta/exim
+ !mail-mta/mini-qmail
+ !mail-mta/msmtp[mta]
+ !mail-mta/nbsmtp
+ !mail-mta/netqmail
+ !mail-mta/nullmailer
+ !mail-mta/qmail-ldap
+ !mail-mta/sendmail
+ !<mail-mta/ssmtp-2.64-r2
+ !>=mail-mta/ssmtp-2.64-r2[mta]
+ !net-mail/fastforward"
+
+# vda patch is broken in 2.9
+REQUIRED_USE="ldap-bind? ( ldap sasl )
+ !vda"
+
+S="${WORKDIR}/${MY_SRC}"
+
+pkg_setup() {
+ # Add postfix, postdrop user/group (bug #77565)
+ enewgroup postfix 207
+ enewgroup postdrop 208
+ enewuser postfix 207 -1 /var/spool/postfix postfix,mail
+}
+
+src_prepare() {
+ if use vda; then
+ epatch "${DISTDIR}"/${VDA_P}.patch
+ fi
+
+ if ! use berkdb; then
+ epatch "${FILESDIR}/${PN}_no-berkdb.patch"
+ fi
+
+ sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
+ src/util/sys_defs.h || die "sed failed"
+
+ # change default paths to better comply with portage standard paths
+ sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
+}
+
+src_configure() {
+ # Make sure LDFLAGS get passed down to the executables.
+ local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread"
+
+ use pam && mylibs="${mylibs} -lpam"
+
+ if use ldap; then
+ mycc="${mycc} -DHAS_LDAP"
+ mylibs="${mylibs} -lldap -llber"
+ fi
+
+ if use mysql; then
+ mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
+ mylibs="${mylibs} $(mysql_config --libs)"
+ fi
+
+ if use postgres; then
+ mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
+ mylibs="${mylibs} -lpq -L$(pg_config --libdir)"
+ fi
+
+ if use sqlite; then
+ mycc="${mycc} -DHAS_SQLITE"
+ mylibs="${mylibs} -lsqlite3"
+ fi
+
+ if use ssl; then
+ mycc="${mycc} -DUSE_TLS"
+ mylibs="${mylibs} -lssl -lcrypto"
+ fi
+
+ # broken. and "in other words, not supported" by upstream.
+ # Use inet_protocols setting in main.cf
+ #if ! use ipv6; then
+ # mycc="${mycc} -DNO_IPV6"
+ #fi
+
+ if use sasl; then
+ if use dovecot-sasl; then
+ # Set dovecot as default.
+ mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
+ fi
+ if use ldap-bind; then
+ mycc="${mycc} -DUSE_LDAP_SASL"
+ fi
+ mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
+ mylibs="${mylibs} -lsasl2"
+ elif use dovecot-sasl; then
+ mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
+ fi
+
+ if ! use nis; then
+ sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \
+ src/util/sys_defs.h || die "sed failed"
+ fi
+
+ if ! use berkdb; then
+ mycc="${mycc} -DNO_DB"
+ if use cdb; then
+ # change default hash format from Berkeley DB to cdb
+ sed -i -e "s/hash/cdb/" src/util/sys_defs.h || die
+ fi
+ fi
+
+ if use cdb; then
+ mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
+ CDB_LIBS=""
+ # Tinycdb is preferred.
+ if has_version dev-db/tinycdb ; then
+ einfo "Building with dev-db/tinycdb"
+ CDB_LIBS="-lcdb"
+ else
+ einfo "Building with dev-db/cdb"
+ CDB_PATH="/usr/$(get_libdir)"
+ for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
+ CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
+ done
+ fi
+ mylibs="${mylibs} ${CDB_LIBS}"
+ fi
+
+ # Robin H. Johnson <robbat2@gentoo.org> 17/Nov/2006
+ # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
+ mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
+ filter-lfs-flags
+
+ # Workaround for bug #76512
+ if use hardened; then
+ [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
+ fi
+
+ # Remove annoying C++ comment style warnings - bug #378099
+ append-flags -Wno-comment
+
+ emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles
+}
+
+src_install () {
+ /bin/sh postfix-install \
+ -non-interactive \
+ install_root="${D}" \
+ config_directory="/etc/postfix" \
+ manpage_directory="/usr/share/man" \
+ readme_directory="/usr/share/doc/${PF}/readme" \
+ html_directory="/usr/share/doc/${PF}/html" \
+ command_directory="/usr/sbin" \
+ mailq_path="/usr/bin/mailq" \
+ newaliases_path="/usr/bin/newaliases" \
+ sendmail_path="/usr/sbin/sendmail" \
+ || die "postfix-install failed"
+
+ # Fix spool removal on upgrade
+ rm -Rf "${D}"/var
+ keepdir /var/spool/postfix
+
+ # Install rmail for UUCP, closes bug #19127
+ dobin auxiliary/rmail/rmail
+
+ # Provide another link for legacy FSH
+ dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
+
+ # Install qshape tool
+ dobin auxiliary/qshape/qshape.pl
+ doman man/man1/qshape.1
+
+ # Performance tuning tools and their manuals
+ dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
+ doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
+
+ # Set proper permissions on required files/directories
+ dodir /var/lib/postfix
+ keepdir /var/lib/postfix
+ fowners -R postfix:postfix /var/lib/postfix
+ fperms 0750 /var/lib/postfix
+ fowners root:postdrop /usr/sbin/post{drop,queue}
+ fperms 02711 /usr/sbin/post{drop,queue}
+
+ keepdir /etc/postfix
+ if use mbox; then
+ mypostconf="mail_spool_directory=/var/spool/mail"
+ else
+ mypostconf="home_mailbox=.maildir/"
+ fi
+ "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
+ -e ${mypostconf} || die "postconf failed"
+
+ insinto /etc/postfix
+ newins "${FILESDIR}"/smtp.pass saslpass
+ fperms 600 /etc/postfix/saslpass
+
+ newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
+ # do not start mysql/postgres unnecessarily - bug #359913
+ use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
+ use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
+
+ mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
+ mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
+
+ dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
+
+ pamd_mimic_system smtp auth account
+
+ if use sasl; then
+ insinto /etc/sasl2
+ newins "${FILESDIR}"/smtp.sasl smtpd.conf
+ fi
+
+ # header files
+ insinto /usr/include/postfix
+ doins include/*.h
+
+ # Remove unnecessary files
+ rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
+ rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
+}
+
+pkg_preinst() {
+ # default for inet_protocols changed from ipv4 to all in postfix-2.9.
+ # check inet_protocols setting in main.cf and modify if necessary to prevent
+ # performance loss with useless DNS lookups and useless connection attempts.
+ [[ -d ${ROOT}/etc/postfix ]] && {
+ if [[ "$(${D}/usr/sbin/postconf -dh inet_protocols)" != "ipv4" ]]; then
+ if [[ ! -n "$(${D}/usr/sbin/postconf -c ${ROOT}/etc/postfix -nh inet_protocols)" ]];
+ then
+ ewarn "\nCOMPATIBILITY: adding inet_protocols=ipv4 to main.cf."
+ ewarn "That will keep the same behaviour as previous postfix versions."
+ ewarn "Specify inet_protocols explicitly if you want to enable IPv6.\n"
+ else
+ # delete inet_protocols setting. there is already one in /etc/postfix
+ sed -i -e /inet_protocols/d "${D}"/etc/postfix/main.cf || die
+ fi
+ fi
+ }
+}
+
+pkg_postinst() {
+ # Do not install server.{key,pem) SSL certificates if they already exist
+ if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
+ && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
+ install_cert /etc/ssl/postfix/server
+ chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
+ fi
+
+ if [[ ! -e /etc/mail/aliases.db ]] ; then
+ ewarn
+ ewarn "You must edit /etc/mail/aliases to suit your needs"
+ ewarn "and then run /usr/bin/newaliases. Postfix will not"
+ ewarn "work correctly without it."
+ ewarn
+ fi
+
+ if [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 9 ]]; then
+ elog "If you are using old style postfix instances by symlinking"
+ elog "startup scripts in ${ROOT}etc/init.d, please consider"
+ elog "upgrading your config for postmulti support. For more info:"
+ elog "http://www.postfix.org/MULTI_INSTANCE_README.html"
+ if ! use berkdb; then
+ ewarn "\nPostfix is installed without BerkeleyDB support."
+ ewarn "Please turn on berkdb USE flag for hash or btree table"
+ ewarn "lookup support.\n"
+ fi
+ ewarn "Postfix daemons now live under /usr/libexec/postfix"
+ ewarn "Please adjust your main.cf accordingly by running"
+ ewarn "etc-update/dispatch-conf or similar and accepting the new"
+ ewarn "daemon_directory setting."
+ fi
+}