summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2013-02-13 16:37:49 +0000
committerEray Aslan <eras@gentoo.org>2013-02-13 16:37:49 +0000
commit24bfe27b7d331763e46d9508e0af8e4f25eb25c0 (patch)
tree177794dd326eea7a6b728aade093f84680980d4e /mail-mta/postfix
parenttidy (diff)
downloadhistorical-24bfe27b7d331763e46d9508e0af8e4f25eb25c0.tar.gz
historical-24bfe27b7d331763e46d9508e0af8e4f25eb25c0.tar.bz2
historical-24bfe27b7d331763e46d9508e0af8e4f25eb25c0.zip
Version bump
Package-Manager: portage-2.2.0_alpha162/cvs/Linux x86_64 Manifest-Sign-Key: 0x77F1F175586A3B1F
Diffstat (limited to 'mail-mta/postfix')
-rw-r--r--mail-mta/postfix/ChangeLog7
-rw-r--r--mail-mta/postfix/Manifest30
-rw-r--r--mail-mta/postfix/postfix-2.11_pre20130211.ebuild331
3 files changed, 353 insertions, 15 deletions
diff --git a/mail-mta/postfix/ChangeLog b/mail-mta/postfix/ChangeLog
index c2b02f228bd6..5ffe20a5ea7b 100644
--- a/mail-mta/postfix/ChangeLog
+++ b/mail-mta/postfix/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for mail-mta/postfix
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.418 2013/02/13 08:48:58 eras Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.419 2013/02/13 16:37:37 eras Exp $
+
+*postfix-2.11_pre20130211 (13 Feb 2013)
+
+ 13 Feb 2013; Eray Aslan <eras@gentoo.org> +postfix-2.11_pre20130211.ebuild:
+ Version bump
*postfix-2.10.0 (13 Feb 2013)
diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
index ea5632f01e1b..27571089da73 100644
--- a/mail-mta/postfix/Manifest
+++ b/mail-mta/postfix/Manifest
@@ -7,31 +7,33 @@ AUX postfix_no-berkdb.patch 2729 SHA256 c21e9582346c913b3033ec6d3567d0b0bd3576ad
AUX smtp.pass 141 SHA256 c9b3b56a8df2367cc15bc43a70304fac7ebdd7697e1d450d1bcb4bfdd3e078e9 SHA512 652b43be887109bf162647e9c0f08dc4283c9fa8795c11c14e88c60984e07593a4cff9e0e6c5dc92c484f547ae0be50a078599fc2fd67a66903b3ac7a8854b55 WHIRLPOOL f075d66d8ae7a13645066e572ab634721aada5aa828380afc5d45f26a6dd34165069bdc7b2edb89357330863f5aac40ee105bbef284392043589a2921381eb1f
AUX smtp.sasl 147 SHA256 0ef6a2a7846498f56b9a8879f561a51c1e3a203ba90b2991d499afa69fd85629 SHA512 0beba4baecb4c4abdd3d2dd61e9e56d3abbc0035184992c98c57538b9244c6a07470974afe663775c3f3f10354e64457aa07e657dfd212e31a0920e3f04a6000 WHIRLPOOL 0c3eef040dd4486e007c31111b965725d3e9cf5a896881e0c927a715598dcc936dbf1034d6add2e6fb8ef4bd0114a7a49a8bba6f27b14aac30023457a1da12a3
DIST postfix-2.10.0.tar.gz 3826655 SHA256 4a42a6029af418cbd4a8668b4f8c7e1ea9975cbe9756df760649c0a941bfeb7b SHA512 88689c2b18aeecd6e363525955c8e3506acf7702eb7fabe148b72a149020c29a76b3f6ed57109380ebb2106cf798a0ce78d470bc4a104a8ecde6c1c4cd0da07e WHIRLPOOL b47559ff91651c699581757976628ab87ffda91ef85f2ccb86ddc4982de68fe7f6dedc419a2708e879969081a7d54681f88763500cd816aed51958bbe0880b70
+DIST postfix-2.11-20130211.tar.gz 3832596 SHA256 062abc9c89eaaeec6300a6ce58798cfa88528a40d971416fd76be4033d25002f SHA512 2037d8033b0e5119b23c71639e15fa3e1ec44854fa03ae9fc6d8962376f0b3ea8651bdc5199bbc43a72caf5d8bbea5d902a7982b6d29a8da7a28aacd8146d6df WHIRLPOOL 42928e3a9a274c966c723c60e7feed1b834a5c357c229cfe53bc2a30165610ce99d1aed6c8ccaba96d1cca6ea6aa54b592d95bb5240b8ed8565773b0031f89a1
DIST postfix-2.9.4.tar.gz 3760718 SHA256 58343afcc727594cc1f9a3980562d8199aa55fc2cf2330da6b9ddfbf31502679 SHA512 f8932ae510805261b4a6c204bd4bba41d50e1833f87326b986ef174b51eb695cf0588d7d98850bb7b83ba56f1257406da072c423cc768f68d3723daf645b9490 WHIRLPOOL 7d7d619e0fa8375f1b653b9e1a0a2fa723929ab87db05445f2c2a73c213e91476d202806a439dd9792499e6a4d43c86f84133e90ffbd3bc9828ba1a925d8d11c
DIST postfix-2.9.5.tar.gz 3761272 SHA256 590381cc0705a6d3fd2279760e79aff625adab6000cb895cf5336ae6a11ee6e4 SHA512 935f0eb653169d77d5902e1046d195d412a6c83271376b6450ddd647d250cc85d5ccd2427ad581f0d65bc57840db4c98f4976faedbe596573be590ea7433a1d4 WHIRLPOOL d57c29683ce389452c55d26ff8f2245f361a9cf6284ce6c2475fd2da1cdea7b9f9ca18376fef8c17f53e19cd29ce624dfd2b0eb5ff3983445ce4de8ea2fb736f
DIST postfix-2.9.6.tar.gz 3767309 SHA256 790542a238f64d2620c26e787c98b07fb6e75a7620ce0584a7932b089dc5367c SHA512 ed53d835814368de9c6de7fe6d24cea36890273acbe62bbbb2c0b4a730765cf5662e8886d6095d8915d1774004c6b5cb278f640c81c63b564a8bfa3bee736912 WHIRLPOOL 24bbacada140e413ca628d9ad8b5eb55a0e3258dc9cef4bf407ebd8b8aac670379a785e60acd14c08f7a94f5058de899014e273634cd52a15a4c8003375a687d
DIST postfix-vda-v11-2.9.1.patch 55009 SHA256 611283a932577944bcdde36e5fe1a80ca750a0a66eb5f3490666e2adafd2bf84 SHA512 ce34b533c2f50cf714d8bd51791c3e30ba91f49861e3c1dcfb08d21d2d38be970b3e3040c7e224142d085c7b11b6b14bfa230844e21daa2eb0bf59641dcc29b9 WHIRLPOOL 0668cafec5678d09504220e31ce60344fc0cb46cfec449db2aade89ee09c598484012c5ef0536a0dfea24df51c6bc86d1a9e491f136312afdab90725e5efe86e
DIST postfix-vda-v11-2.9.5.patch 55009 SHA256 df30379c456971a514ae5587531bb5cd8492921a6a27e6d23f5014a1434945aa SHA512 c44497536e2bc313f2301e799a6614f396fc7bb06ef31493460edc59b0922b4d9a24802a84e2b8cf158277f5b0c8c59b53a4f8ef6896ee1e2ba538c562687010 WHIRLPOOL 70c438d2e98aaae6ebd37fadb5d5d0cbe3b31baf2119657009802be62bfeef7dc6a6e62fc8259bfe635ccbf4b0c8ffa17b35a04648c6c138575dda8314a28744
EBUILD postfix-2.10.0.ebuild 10444 SHA256 378db909a9d330651664e5d5962128fec70c56aa12c564ae1457529f20c7caef SHA512 90f733cf6256f5de02a9d9b1bf6fae8d61a559ced49ab97958e9b5540ac1b9c30ec417a8a5463c52570e190eda1b80f73f74092ced351e851be342cb305f64e7 WHIRLPOOL 2b25dacad5c026fc8a9390bdc17178dc1d0391106fc3fc10e3d0d3158ba4207749150fa348a033c502bfa64efb628b43271844d8bddb4a92ce3cd83632ed7f0f
+EBUILD postfix-2.11_pre20130211.ebuild 10458 SHA256 3c4d20989b672fb4562a8539c8c38c67ef9f9b415cc3238a512c306409b5d1cb SHA512 6a529b1c52f259a63d3c6da1d590747d01c175fdbad12bc39ef5d5d62f1e249f37ed84c5daec559d880c0f72dff9d684a10b490879979ae6f0aa96116db6e5ef WHIRLPOOL f7404eed99284586f59d0f227e87cd8eb20854ed223720f048c2ca30b4d9fe83555b0945a7b762ad571982cadbf410df8130ed4fc50deb2fd7964bde18815408
EBUILD postfix-2.9.4.ebuild 9607 SHA256 fc5adc3752832a6eb890cd09f455d19cf5f46be90b9506dc0a62941a8a2bd3c2 SHA512 2113abad4c72af6a87587abfcf5e45c757d1ce28e92011ecefdfa7a1803fb14e4b448086de11d13deb7f075448003664b6e7576de1cc20ad733ae04b739fc814 WHIRLPOOL 0fe266bc1597991606d2a3c71834ab62b9abdce161ed5a9bd0f155c6ea25e5ec0c0ed3d46d5667efde42569c514eb12875646b0d7768370dd3bb606b9db12632
EBUILD postfix-2.9.5.ebuild 9608 SHA256 13824aac4df3396a46290706144fb64dd06a27e2482b7c308786a25d7fc836b0 SHA512 9349dd758a9178eb4d39a4b960b6944084e37534a7ed569ce2da3969d8d43f529351b6432c271bca01e85bcce906f4d2b5da108015a76df82c3a2262d1fed485 WHIRLPOOL f26ec58f68c5156216b064970df584757d04fa88204abed0b0d88a799d4f25df6463f9bb18654ec3c67bca74d05d12a0253041220f94d8efef993191259ba1fb
EBUILD postfix-2.9.6.ebuild 9617 SHA256 bfa4d311ce0016c5cb3b2566711ebd89aad0c6556bf24c2655e78d380ceaafd6 SHA512 2512a3984cc1052e218903a30d47660df7b3eb3ac83c8d8e67947da48f2fe6aacc56f189ff45eb02f41a73f8e61bbb7e0354cc5ede8fb3a7e5c3b8e7257179fc WHIRLPOOL e892ba7cca6f5e6c2607e065b1b959f49151f09d8793f7195aaf97e02427f96684ef66b091e217e74bbea28db9c900630ba112d6021cf731862ec2a4c7b1526d
-MISC ChangeLog 90783 SHA256 2dd4d96483346ab38176e4458874228816d9d2f656a79be981c1bd8b6c56528b SHA512 ed0741466c3a9bd025e1ac11427da434b0e7b2c4d70150a7847cbff98ae96d5cfdac13806209a12262c43ce57907db8a7bd369b14a67637142b1d62c8777c031 WHIRLPOOL ea7d9d3c43a0a00c3c7663c06a2d5f7d57313d0373f4dcde64dd2817beb3655a16d16e08648a251a68885a858db1a7292eca4733ae70d08d419293786d64d0f1
+MISC ChangeLog 90918 SHA256 783d0cfb909ff31c5afc9c54b8a489d4fefc395fc13e59625178571a1c9ce82c SHA512 039420bd9dbc0633bfe99cfbfcfab0ed9e72eee0e38260ef27b5eea9011d0314dc7f2733c2295eeebaa07377a5a0a19697d27a25b48609e9489bc7ed33df3932 WHIRLPOOL 26f1a1927ae7edbe07cf2c46afe448deceeeaa7f11d7e2dc1147ddf75792cd27f0941568b13cfad1ae9c4229ef3fd8b7dbdb6ea7eaaa7f088555362db5942edd
MISC metadata.xml 610 SHA256 00b7ef524664b20a9df7642573745b1d17b0b51f005ffd150ac6dccba38dee88 SHA512 fd446f288b11070e2d6b5dad3ec259a889508c3c7f4755ea2ceda18500844e065ddc2bbce5f4108b30ebacff76443ea8a23805c21d39c2bf72210f801adcfe06 WHIRLPOOL 815ae4ddbaca96871454d44adbe3bec4a081d857c61b07cd0e382ce0d44503421a4ad156da6009cc91f24855b7c1d8adfe3fbd48c82833f9d82c1afaf798072e
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQIcBAEBCAAGBQJRG1OGAAoJEHfx8XVYajsfLxgQAI29Ax1zN4dQVcW6HT/0i+QR
-y4gagS/GnW99yvXiQfi+lJKkeIdSQSKwfNABH+YFYffIINjdYsX3SWa5a2q98qMa
-1uYMxLfXpsUDjhnG9GdDsPP8q+O6mT/GZ+u30tLrckwacK9FKhRcOxGf5KE+gsTg
-Nz+YvXNt/4XBW+5EtkGp1hOPXnG7GJ4mIH1b3kzMFZER+KkXoortyRlaiyMj0KUL
-dTGMZYUQl6mEMjXeAqoFXa50FyHKDa/uVJAzzk0mCFeVKLmoRB7iKb39fMPmGd9P
-q58YRtPhMyibsspKpOQTN4JrYvw3zRXD1tvLmdBAEe6cDh+SjODqfOXrSLb3rBd9
-sNMuznaWEaQipfaefEyRxhEI5RbP2KJXlQgdM599ZwJBtLCQ01ZJmuzh8dXKubUl
-3bBdmoktscN2kmZ9tvPFgsCuXv2lJe+HMIWB2SlVtqrxDSaV4kJnTk/lUksauBCt
-V041IlxBgvFG5BzD/jP1vnDIcZs9lD3U5zFAN3bypedz6mYALHYYe5cnBrzcL1Mo
-jQ/FtASvXsI1pdgM4UkKzgJ5A4r59m282HaKPk5wzEsyS0Aqgvak7EmluZJzXw4F
-pcTpcyfgXjjcAIEXQbt2QgD/hlzDXGg9Wm8Z/qanVNimsooGW+GaL2VR5i09VWYc
-iI5Jd7HIuMl7nFECLn94
-=lHoY
+iQIcBAEBCAAGBQJRG8FdAAoJEHfx8XVYajsf2YwQAKg9egQu4EbQsTB/ixuT4RwG
+14tmMOQlNJmdwrVXUJQpzsrARrI+SiOY04FjM4aCeUsW5sAEF8KUGb+TBNo0KRTJ
+LevaqzQOhWyB3m69xefqlhOGiy4wMj8jt0hh497xbeY9AkjewpQxyG6mQjGrxnWA
+yFmF05ECVjI63H86MDhZXlgfy1d2BxAxRq2D/httWgKlLo0VxykOCcykfV6qzIxm
+IXGeEDITwtO7Mg04wrHGUAnh828K2HhltisZD5ZhV2IOQkDd53mT/i6yGevDEcE/
+B6WlvKlKauqxkrYXrTUIarnfQBSpojJo5LUG1JgQvJgOAwfWKrNe44JS3aZXcRU9
+DAeJ2+UljmkAeqdC+rNTJagfa49WcuGFj7FRIQTUrms1U50j4OxmPLS/XbdJX4bf
+jQDqHULPv+x7XRo7Z4tSpvRuGANzlZqUchRPd4n48XbeTH9ormblHM0rC7BL8MUD
+RTVVbi6CGkZElSwXwY+t/1jP3dSqYvxwxwUI3h3ufNY6TIvYS9noQ6V4JmISfSHm
+GiEtYA8l5nvtdOVokpBKwMbmeP5ZJd3WAlnikSrcgQsF5vYJWxqEz83E1sckwJvg
+AaiJiNrun/Iaq7t+LLGhyBRu0tC2hdB8HdYdm+al1b0TPu6l9g2xbO2LfmMSQ+f0
+kloxL+Bhe87WM7Uxy3TC
+=Zcow
-----END PGP SIGNATURE-----
diff --git a/mail-mta/postfix/postfix-2.11_pre20130211.ebuild b/mail-mta/postfix/postfix-2.11_pre20130211.ebuild
new file mode 100644
index 000000000000..f7a76bbd347c
--- /dev/null
+++ b/mail-mta/postfix/postfix-2.11_pre20130211.ebuild
@@ -0,0 +1,331 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.11_pre20130211.ebuild,v 1.1 2013/02/13 16:37:37 eras Exp $
+
+EAPI=5
+inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam user versionator
+
+MY_PV="${PV/_pre/-}"
+MY_SRC="${PN}-${MY_PV}"
+MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental"
+VDA_PV="2.9.5"
+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 ~mips ~ppc ~ppc64 ~s390 ~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/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}"
+
+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
+
+ sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs
+ sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs
+ emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles
+}
+
+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="/etc/postfix" \
+ manpage_directory="/usr/share/man" \
+ command_directory="/usr/sbin" \
+ mailq_path="/usr/bin/mailq" \
+ newaliases_path="/usr/bin/newaliases" \
+ sendmail_path="/usr/sbin/sendmail" \
+ ${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 -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"
+
+ dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
+ mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
+ use doc && mv "${S}"/examples "${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
+
+ # 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() {
+ # Postfix 2.9.
+ # 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 -n 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
+ }
+
+ # Postfix 2.10.
+ # Safety net for incompatible changes due to the introduction
+ # of the smtpd_relay_restrictions feature to separate the
+ # mail relay policy from the spam blocking policy.
+ [[ -d ${ROOT}/etc/postfix ]] && has_version '<=mail-mta/postfix-2.9.99' && {
+ if [[ -z "$(${D}/usr/sbin/postconf -c ${ROOT}/etc/postfix -n smtpd_relay_restrictions)" ]];
+ then
+ local myconf="smtpd_relay_restrictions=permit_mynetworks,permit_sasl_authenticated,defer_unauth_destination"
+ ewarn "\nCOMPATIBILITY: adding smtpd_relay_restrictions to main.cf"
+ ewarn "to prevent inbound mail from unexpectedly bouncing."
+ ewarn "Specify an empty smtpd_relay_restrictions value to keep using"
+ ewarn "smtpd_recipient_restrictions as before.\n"
+ "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix -e ${myconf} || die
+ 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 if you need hash or"
+ ewarn "btree table lookups.\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
+}