summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2008-03-14 08:18:43 +0000
committerUlrich Müller <ulm@gentoo.org>2008-03-14 08:18:43 +0000
commitc7a658689d7e246c674fd4f7598538b595f6df01 (patch)
treeff5476fe8e15dc8dae30ef89761569ccfcec5575 /mail-mta/postfix
parentppc stable, bug #212635 (diff)
downloadhistorical-c7a658689d7e246c674fd4f7598538b595f6df01.tar.gz
historical-c7a658689d7e246c674fd4f7598538b595f6df01.tar.bz2
historical-c7a658689d7e246c674fd4f7598538b595f6df01.zip
Remove versions vulnerable wrt bug 201671, as far as yet possible.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'mail-mta/postfix')
-rw-r--r--mail-mta/postfix/ChangeLog7
-rw-r--r--mail-mta/postfix/Manifest23
-rw-r--r--mail-mta/postfix/files/postfix.rc630
-rw-r--r--mail-mta/postfix/files/smtp.pam4
-rw-r--r--mail-mta/postfix/postfix-2.1.5-r2.ebuild254
-rw-r--r--mail-mta/postfix/postfix-2.2.10.ebuild348
-rw-r--r--mail-mta/postfix/postfix-2.3.6.ebuild387
7 files changed, 17 insertions, 1036 deletions
diff --git a/mail-mta/postfix/ChangeLog b/mail-mta/postfix/ChangeLog
index 99bc65a487eb..9f0abf940ec5 100644
--- a/mail-mta/postfix/ChangeLog
+++ b/mail-mta/postfix/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for mail-mta/postfix
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.151 2008/03/14 01:11:47 beandog Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.152 2008/03/14 08:18:43 ulm Exp $
+
+ 14 Mar 2008; Ulrich Mueller <ulm@gentoo.org> -files/postfix.rc6,
+ -files/smtp.pam, -postfix-2.1.5-r2.ebuild, -postfix-2.2.10.ebuild,
+ -postfix-2.3.6.ebuild:
+ Remove versions vulnerable wrt bug 201671, as far as yet possible.
14 Mar 2008; Steve Dibb <beandog@gentoo.org> postfix-2.2.11-r1.ebuild,
postfix-2.3.8-r1.ebuild, postfix-2.4.6-r2.ebuild:
diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
index 6042460e8183..10827ea6879d 100644
--- a/mail-mta/postfix/Manifest
+++ b/mail-mta/postfix/Manifest
@@ -1,34 +1,33 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX mailer.conf 438 RMD160 b9efd9921c9e6295d8791e621e4e08510b526ac4 SHA1 fad8603d181a0d1ba104f09719e5620bae421288 SHA256 4ea1fb59653bd12841501f30781bda51a66aae56a5560623f7d41709dc97c839
AUX postfix-2.0.9-get-FQDN.patch 1057 RMD160 492e9de53c0a16e71940ab4f4ed99bc4f76061fa SHA1 38f0322792822612a836ded1845368b23d3c1120 SHA256 6e5f5a1f9bc60e04d6decc8491c5955c625396f23698d961c412b50ec793e878
AUX postfix-master.cf.patch 1064 RMD160 25283e8c3c27ff156e229ad1ae8643d3be61d6b7 SHA1 86088a034f6cf4a09a68436c97df5e5babf11251 SHA256 b1f7040cb9445379c4318e2161efd79c74bc6927125f4542eb87500ece145f60
-AUX postfix.rc6 610 RMD160 aa77be0be55cc95613ea6ab35d46bb9c650e8b8b SHA1 141699bdd719f45eb83a4379c3dfb8f6ae4dcac2 SHA256 30ec591c7442c39d7cb32c189218d492d3f880fb0c940197a1f7020e160658aa
AUX postfix.rc6.2.2.9 648 RMD160 5c8242c63e4263734ae2c51f20c5970db53dc604 SHA1 fc8f2b301c853fe01ad920c33a3c1027a4480322 SHA256 8c7c77faf61f81f4e29bafd4255bdd2fc237c15059440b16c975a7f4967b3ac0
-AUX smtp.pam 254 RMD160 20dd773a4918a5d73a8ff6353c083018964892b6 SHA1 d39d59e280b8e597c4b162494a1386f41c74830c SHA256 a13eedc9e0efe8066295719d780d188e28d3d0c0ca838f32fea874c4baf1c445
AUX smtp.pass 141 RMD160 799433a4ee9e9e32f20aa2d31f85f33faa2bc7e6 SHA1 e1d75aa259fa07b257a617e056662aecfd19957f SHA256 c9b3b56a8df2367cc15bc43a70304fac7ebdd7697e1d450d1bcb4bfdd3e078e9
AUX smtp.sasl 131 RMD160 6831f9bbfd76be0d39fdda4270120824ebb9f52f SHA1 613dff95ac21bd306c2917e5360430772efbb146 SHA256 954ba1e80537ca01b935b856e31ec4e3e41c138f04b7cf99ccb969876b8b78e7
-DIST ipv6-1.26-pf-2.1.5.patch.gz 52420 RMD160 bab08d451588505d8828768441bea57bb7d50bbd SHA1 764b363e37c6ff19951e35b3333445e2ac5575b7 SHA256 70bbaa8e447cff1d4430f9843da054be10e79f4390a446243d069a6853b5719f
-DIST pfixtls-0.8.18-2.1.3-0.9.7d.tar.gz 239141 RMD160 9c50dc7e772e889cba3e0f3b56f5ea6b84fcf973 SHA1 313d572bcd960e3cafd78ac9ee4b87bdc1f02fc8 SHA256 a6e7261ced89c746444fbc7dda9978f49010c56e0d0eca27438fe940f1c4c8f1
-DIST postfix-2.1.5-trash.patch.gz 7049 RMD160 dcde759af7d951ead3dbd817af3eb4e499a3cbff SHA1 dc95622a171943219230270af773fcc699d37180 SHA256 1a3ce19aec84dfa0447ecd65e5534509e73b0ca08cfc63d65091cc6ee63a373e
-DIST postfix-2.1.5.tar.gz 1971931 RMD160 c0e078babbc3e76035fe4f502ea5fb3645e8ed92 SHA1 bbc65c9fdc1cbd8e553816a5549b2685255cf69d SHA256 4e6d741e286fb43be575f7b41ab45c2fddd27723a16665b4e7cf51199ead0b7a
DIST postfix-2.2.10-vda.patch.gz 7799 RMD160 01c36255cb2bac7518b94fd5074d1182b7680bdd SHA1 00a989f11fb8bb4561738e454960d6b163a7c68e SHA256 32aa3f7219e3da3bda362223ee34d6571c796f601b565de1890bce628446e0cc
DIST postfix-2.2.10.tar.gz 2443513 RMD160 12376298eef12cbe127687328ebfb9166cfee5d6 SHA1 a432bd45f0c7098482394dd7b9c97100e8a040e1 SHA256 7c3f4cabd9f5bbba0c8987b0dcbafdce45a4f13b7f917bcfc6d7b3caf8ce34f1
DIST postfix-2.2.11.tar.gz 2448022 RMD160 0915a4daafeb4e316754d5da1305f3d69074d705 SHA1 e0fe3d2ce8e7b5ec4e760d03d8bcdf67b46544be SHA256 07d3959a20f0d47785cad3dddf22676b041a57c798cb7bad43c405389abf1d12
DIST postfix-2.2.8-vda.patch.gz 7741 RMD160 c74969b300232900d816df5f5dad7e3178db43ed SHA1 149ad8fc82cc7aad5f5d86b89694efbb79bfef9b SHA256 b325514aa1bb3f90dcc749be16f7c74d18d8ab75cee6f9b20d740dd0ce5c07ac
DIST postfix-2.3.3-vda.patch.gz 7944 RMD160 bdbd0798ca4d23c6e8443b26b957b8d0d252da1d SHA1 70c2d41363ead6d9129849e09df551d6ed77920a SHA256 4fdff601e0b2653025c9b9ca8875e995b8052e2e362c3a5e035c3d2859bd4fa2
-DIST postfix-2.3.6.tar.gz 2783743 RMD160 075abdb127ebef529388dcbfe36af277bab9d7d1 SHA1 6675da860f92237357c0f23214131500951d99a8 SHA256 2ae5d7d6d03d26a7f7b4b4aa1f1ab87017352a8bf9541171e318393fe5309fce
DIST postfix-2.3.8.tar.gz 2787761 RMD160 2984ca8e81375a3124801c999d23637e745de54c SHA1 c40ebae5cdcd53e13ae8ba5cac1a70167576859b SHA256 f19c26646e19cc93bdb01b1118ad6bdc67c0ec506c7dc989370e117c8d43f3e6
DIST postfix-2.4.5-vda-ng.patch.gz 12241 RMD160 d88971edd77d2fd38479d55ad941599ce0fb26e3 SHA1 7bc3a9639e64747b49bd862dc7cc326ab3aacd72 SHA256 ca21c1fddb1c6f11b90a363408056f0656dcbd747198ef61c7ee2998a07e0087
DIST postfix-2.4.5.tar.gz 2934634 RMD160 a6ffd6211f292c56558ebd2ebce8f09deea95ca1 SHA1 dc3616ffd441c23748273527b6693835f3502ad2 SHA256 bce55ae6be130ef085c9968bfdf8ac36e4b77dd4bd84ba9da4fc7fc3464c65d7
DIST postfix-2.4.6-vda-ng-r2.patch.gz 12397 RMD160 a03f29df52eb5c2974206cd3ee32305c24d4be73 SHA1 71c9b71a238093f944865fbc90704a25710d3f3f SHA256 d8186d4c0f19b0a989d98305d9bd1c8e27223c3a4fb549d5581f279e567fadf5
DIST postfix-2.4.6.tar.gz 2935249 RMD160 115b3a4eb982701e29db2e52e294ec8ee69bdae5 SHA1 226222707fd8d963d3173070cac96370c453ffa7 SHA256 00d079d6354bb3979b186da6bbe281b42eea2716620da781bcdb36dd558edcca
-DIST tls+ipv6-1.26-pf-2.1.5.patch.gz 256725 RMD160 ff2fb005681659476383fe4f32fd1d14e51fa9d9 SHA1 6813eb7d1c1ac9a76a04b7495d540236aa0aa625 SHA256 9ce416069f8dec16a9fc31aee875f8832cd97c167ceee0e572ef10b94ae4849d
-EBUILD postfix-2.1.5-r2.ebuild 7553 RMD160 31bb4a1d6614448de718136c03ee5f6e5d68e529 SHA1 83485d01a0bbccf0796201212ce583ed991a75c0 SHA256 3b8b85b7891b4e95050403a714c146e324cd6d3711e51b7c9d572db7dcd8dc89
EBUILD postfix-2.2.10-r1.ebuild 10283 RMD160 b2b3629e12b4371bece59da7181ab58a97de45be SHA1 11540902c277d87e18b645ff979e80c0774b776a SHA256 e2a72f6c761020ffdf77526558f4b9ec635cdc3911e9eba98e020a3b895f923b
-EBUILD postfix-2.2.10.ebuild 10499 RMD160 fab251cab416d4ea3a34cb448e1d18d514318bca SHA1 0332b373d24373316f9e8c2eb947368e0c18f62b SHA256 c233403a606fc177c04c17d98377165c2c099b1ade89ca96b8dab71bcaabbacb
EBUILD postfix-2.2.11-r1.ebuild 10448 RMD160 c407b24fb1bea9d24a383fee8dadafa947dadc30 SHA1 4ef1ef001c1cf8746174747044b8cccdc834a233 SHA256 5d4d6ed2a019db9e20c0cec7343536fe7712fe531e21e87f395f8994c3b3a09d
-EBUILD postfix-2.3.6.ebuild 11733 RMD160 2404297aefdddb372b70abc7ba5faa6a32d731b7 SHA1 acd24db82d75e1af425891cf77771725b69986e4 SHA256 cb69161151cbe6177f4a8c4171da9212de7d19f40976a9ac90ec5fd4285c027b
EBUILD postfix-2.3.8-r1.ebuild 11781 RMD160 c198c76f96e2ff31912e1196eca5f47d97bec8d3 SHA1 4f4eff4ce639f32e31a07b85c00ac6aa310f6d69 SHA256 02343d6b1cb15cfe450535fa6a911456272beeb19ee3e076ed00b43e853f9867
EBUILD postfix-2.4.5.ebuild 11678 RMD160 fb60b2092618dc26a634fad020f825957e2d3413 SHA1 19d8dd063b6437b361ef4ad14239b5b7ef3c5cab SHA256 e206fe2db84685d199da6a18e29f0e50475a9cb979066bd65ad113cf0273c1c3
EBUILD postfix-2.4.6-r2.ebuild 11692 RMD160 a6aeddb3e91e1713d9ccd7735f331d56586818a3 SHA1 9ef87820262990becc9e80d2edc649e380e566df SHA256 1a22cefee0dbefa9dde2e1874b5a5c6b60390c429900b5324d82c544a5433da6
-MISC ChangeLog 47236 RMD160 7be3849ee226a58a7df24a8f2d1d9226267f027e SHA1 8669c2d6335dbc264219aa41bd82a82c261bc268 SHA256 b39053ec34b24342530b756040ea8ac5ff3bcd0bbb8d05a368bf4c688e573380
+MISC ChangeLog 47463 RMD160 8f2fae25edab96a309177e139ccf1290b599dd79 SHA1 dd8d0d0f6363e3fb59dfbbadff1de50bc91994f6 SHA256 57bc08d55c3d9320d2a01f88c21a750ede657e38d76b5028389eaf3a28cc7d29
MISC metadata.xml 162 RMD160 fd38b82541901b3c6df18b630d79fe7883ae3f01 SHA1 e6aecefcc2137d6047cedfe447686775ab59cb48 SHA256 569031668e39895fb20829fb17a49a91a83e8f41b2195b0f04825c4340d2af6b
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.8 (GNU/Linux)
+
+iEYEARECAAYFAkfaNNcACgkQOeoy/oIi7ux53gCfWIoeIoujuKrcVfPQ0gucYKzK
+gq4AniiTonP+6m3xh6wGhE3ElZ97d4Hg
+=ZEhw
+-----END PGP SIGNATURE-----
diff --git a/mail-mta/postfix/files/postfix.rc6 b/mail-mta/postfix/files/postfix.rc6
deleted file mode 100644
index cc81096672c2..000000000000
--- a/mail-mta/postfix/files/postfix.rc6
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/postfix.rc6,v 1.5 2005/01/27 10:59:29 ticho Exp $
-
-opts="${opts} reload"
-
-depend() {
- need net
- use logger dns ypbind amavisd mysql postgresql antivirus
- provide mta
-}
-
-start() {
- ebegin "Starting postfix"
- /usr/sbin/postfix start &>/dev/null
- eend $?
-}
-
-stop() {
- ebegin "Stopping postfix"
- /usr/sbin/postfix stop &>/dev/null
- eend $?
-}
-
-reload() {
- ebegin "Reloading postfix"
- /usr/sbin/postfix reload &>/dev/null
- eend $?
-}
diff --git a/mail-mta/postfix/files/smtp.pam b/mail-mta/postfix/files/smtp.pam
deleted file mode 100644
index cd762a4118ea..000000000000
--- a/mail-mta/postfix/files/smtp.pam
+++ /dev/null
@@ -1,4 +0,0 @@
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/smtp.pam,v 1.2 2004/07/18 03:26:56 dragonheart Exp $
-auth required /lib/security/pam_stack.so service=system-auth
-account required /lib/security/pam_stack.so service=system-auth
-
diff --git a/mail-mta/postfix/postfix-2.1.5-r2.ebuild b/mail-mta/postfix/postfix-2.1.5-r2.ebuild
deleted file mode 100644
index 0ef250d7a4ab..000000000000
--- a/mail-mta/postfix/postfix-2.1.5-r2.ebuild
+++ /dev/null
@@ -1,254 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.1.5-r2.ebuild,v 1.19 2008/03/13 22:55:01 ricmm Exp $
-
-inherit eutils ssl-cert toolchain-funcs
-
-VDA_P="${PN}-2.1.5-trash"
-TLS_P="pfixtls-0.8.18-2.1.3-0.9.7d"
-IPV6="1.26"
-IPV6_P="ipv6-${IPV6}-pf-2.1.5"
-IPV6_TLS_P="tls+${IPV6_P}"
-PGSQL_P="postfix-pg.postfix-2.0.0.2"
-
-DESCRIPTION="A fast and secure drop-in replacement for sendmail."
-HOMEPAGE="http://www.postfix.org/"
-SRC_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official/${P}.tar.gz
- vda? ( http://web.onda.com.br/nadal/postfix/VDA/${VDA_P}.patch.gz )
- ssl? ( ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/${TLS_P}.tar.gz )
- ipv6? ( ftp://ftp.stack.nl/pub/postfix/tls+ipv6/${IPV6}/${IPV6_P}.patch.gz )
- ipv6? ( ftp://ftp.stack.nl/pub/postfix/tls+ipv6/${IPV6}/${IPV6_TLS_P}.patch.gz )"
-
-LICENSE="IPL-1"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
-IUSE="ipv6 pam ldap mysql postgres ssl sasl vda mailwrapper mbox selinux"
-
-PROVIDE="virtual/mta virtual/mda"
-DEPEND=">=sys-libs/db-3.2
- >=dev-libs/libpcre-3.4
- >=sys-apps/sed-4
- ldap? ( >=net-nds/openldap-1.2 )
- mysql? ( virtual/mysql )
- postgres? ( >=dev-db/postgresql-7.1 )
- ssl? ( >=dev-libs/openssl-0.9.6g )
- sasl? ( >=dev-libs/cyrus-sasl-2 )"
-RDEPEND="${DEPEND}
- >=net-mail/mailbase-0.00
- selinux? ( sec-policy/selinux-postfix )
- !mailwrapper? ( !virtual/mta )
- mailwrapper? ( >=net-mail/mailwrapper-0.2 )"
-
-pkg_setup() {
- # put out warnings to work around bug #45764
- if has_version '<=mail-mta/postfix-2.0.18'; then
- echo
- ewarn "You are upgrading from postfix-2.0.18 or earlier, one of the empty queue"
- ewarn "directory get deleted during unmerge the older version (#45764). Please run"
- ewarn "\`etc/postfix/post-install upgrade-source\` to recreate them."
- echo
- epause 5
- fi
-
- # logic to fix bug #53324
- if [[ -f /var/lib/init.d/started/postfix ]] ; then
- if has_version '<mail-mta/postfix-2.1.3' ; then
- echo
- eerror "You are upgrading from the incompatible version."
- eerror "Please stop Postfix then emerge again."
- die "Upgrade from incompatible version."
- else
- echo
- ewarn "It is safe to upgrade your current version while it's running."
- ewarn "If you don't want to take any chance; please hit Ctrl+C now;"
- ewarn "stop Postfix then emerge again."
- ewarn "You have been warned!"
- ewarn "Waiting 10 seconds before continuing."
- echo
- epause 10
- fi
- fi
-}
-
-src_unpack() {
- unpack ${A} && cd "${S}"
-
- if use ssl ; then
- if use ipv6 ; then
- epatch "${WORKDIR}/${IPV6_TLS_P}.patch"
- else
- epatch "${WORKDIR}/${TLS_P}/pfixtls.diff"
- fi
- elif use ipv6; then
- epatch "${WORKDIR}/${IPV6_P}.patch"
- fi
-
- if use vda ; then
- epatch "${WORKDIR}/${VDA_P}.patch"
- fi
-
- # We don't need this patch anymore
- # http://www.postfix.org/PGSQL_README.html
- # if use postgres ; then
- # epatch "${DISTDIR}/${PGSQL_P}.patch"
- # fi
-
- # Verisign name services fixes. Do we need this anymore?
- # epatch "${WORKDIR}/${PN}-2.0-ns-mx-acl-patch"
-
- # Postfix does not get the FQDN if no hostname is configured.
- epatch "${FILESDIR}/${PN}-2.0.9-get-FQDN.patch"
-
- # Fix install paths.
- sed -e "s:/usr/libexec/postfix:/usr/lib/postfix:" \
- -i src/global/mail_params.h -i conf/main.cf || die "sed failed"
-}
-
-src_compile() {
- # added -Wl,-z,now wrt 62674.
- # make sure LDFLAGS get passed down to the executables.
- local mycc="-DHAS_PCRE" mylibs="-Wl,-z,now ${LDFLAGS} -lpcre -ldl -lcrypt -lpthread"
-
- if use pam ; then
- mylibs="${mylibs} -lpam"
- fi
- if use ldap ; then
- mycc="${mycc} -DHAS_LDAP"
- mylibs="${mylibs} -lldap -llber"
- fi
- if use mysql ; then
- mycc="${mycc} -DHAS_MYSQL -I/usr/include/mysql"
- mylibs="${mylibs} -lmysqlclient -lm -lz"
- fi
- if use postgres ; then
- if best_version '=dev-db/postgresql-7.3*' ; then
- mycc="${mycc} -DHAS_PGSQL -I/usr/include/postgresql"
- else
- mycc="${mycc} -DHAS_PGSQL -I/usr/include/postgresql/pgsql"
- fi
- mylibs="${mylibs} -lpq"
- fi
- if use ssl ; then
- mycc="${mycc} -DUSE_SSL"
- mylibs="${mylibs} -lssl -lcrypto"
- fi
- if use sasl ; then
- mycc="${mycc} -DUSE_SASL_AUTH -I/usr/include/sasl"
- mylibs="${mylibs} -lsasl2"
- fi
-
- mycc="${mycc} -DDEF_CONFIG_DIR=\\\"/etc/postfix\\\""
- mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/lib/postfix\\\""
- mycc="${mycc} -DDEF_PROGRAM_DIR=\\\"/usr/lib/postfix\\\""
- mycc="${mycc} -DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\""
- mycc="${mycc} -DDEF_README_DIR=\\\"/usr/share/doc/${PF}/readme\\\""
-
- local my_cc=$(tc-getCC)
- make CC="${my_cc:=gcc}" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
- makefiles || die "configure problem"
-
- emake || die "compile problem"
-}
-
-src_install () {
- /bin/sh postfix-install \
- -non-interactive \
- install_root="${D}" \
- daemon_directory="/usr/lib/postfix" \
- program_directory="/usr/lib/postfix" \
- config_directory="/usr/share/doc/${PF}/defaults" \
- readme_directory="/usr/share/doc/${PF}/readme" \
- manpage_directory="/usr/share/man" \
- mail_owner="postfix" \
- setgid_group="postdrop" || die "postfix-install failed"
-
- # Fix spool removal on upgrade.
- rm -rf "${D}/var"
- keepdir /var/spool/postfix
-
- # mailwrapper stuff
- if use mailwrapper
- then
- mv "${D}/usr/sbin/sendmail" "${D}/usr/sbin/sendmail.postfix"
- insinto /etc/mail
- doins "${FILESDIR}/mailer.conf"
- fi
-
- # Provide another link for legacy FSH.
- dosym /usr/sbin/sendmail /usr/lib/sendmail
-
- # Install an rmail for UUCP, closing bug #19127.
- dobin auxiliary/rmail/rmail
-
- # Install qshape tool.
- dobin auxiliary/qshape/qshape.pl
-
- # Set proper permissions on required files/directories.
- 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,post*-*} ${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 \
- "alias_maps=hash:/etc/mail/aliases" \
- "alias_database=hash:/etc/mail/aliases" \
- "local_destination_concurrency_limit=2" \
- "default_destination_concurrency_limit=2" \
- ${mypostconf} || die "postconf failed"
-
- insinto /etc/postfix
- newins "${FILESDIR}/smtp.pass" saslpass
- fperms 600 /etc/postfix/saslpass
-
- newinitd "${FILESDIR}/postfix.rc6" postfix
-
- mv "${S}/examples" "${D}/usr/share/doc/${PF}/"
- dodoc *README COMPATIBILITY HISTORY INSTALL LICENSE PORTING RELEASE_NOTES*
- dohtml html/*
-
- if use pam ; then
- insinto /etc/pam.d
- newins "${FILESDIR}/smtp.pam" smtp
- fi
- if use ssl ; then
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
- insinto /etc/ssl/postfix
- docert server
- fowners postfix:mail /etc/ssl/postfix/server.{key,pem}
- fi
- if use sasl ; then
- insinto /etc/sasl2
- newins "${FILESDIR}/smtp.sasl" smtpd.conf
- fi
-}
-
-pkg_postinst() {
- ebegin "Fixing queue directories and permissions"
- "${ROOT}/etc/postfix/post-install" upgrade-permissions
- echo
- ewarn "If you upgraded from postfix-1.x, you must revisit"
- ewarn "your configuration files. See"
- ewarn " /usr/share/doc/${PF}/RELEASE_NOTES"
- ewarn "for a list of changes."
-
- if [ ! -e /etc/mail/aliases.db ] ; then
- echo
- 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."
- fi
-
- if ! use mailwrapper && [[ -e /etc/mailer.conf ]]
- then
- einfo
- einfo "Since you emerged $PN without mailwrapper in USE,"
- einfo "you probably want to 'emerge -C mailwrapper' now."
- einfo
- fi
-}
diff --git a/mail-mta/postfix/postfix-2.2.10.ebuild b/mail-mta/postfix/postfix-2.2.10.ebuild
deleted file mode 100644
index 129d6767bde5..000000000000
--- a/mail-mta/postfix/postfix-2.2.10.ebuild
+++ /dev/null
@@ -1,348 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.2.10.ebuild,v 1.13 2008/03/13 22:55:01 ricmm Exp $
-
-inherit eutils ssl-cert toolchain-funcs flag-o-matic pam
-IUSE="ipv6 pam ldap mysql postgres ssl sasl mailwrapper mbox nis vda selinux hardened cdb"
-#IUSE="ipv6 pam ldap mysql postgres ssl sasl mailwrapper mbox nis vda selinux hardened devel"
-
-MY_PV=${PV}
-MY_SRC=${PN}-${MY_PV}
-#DEV_SRC=${MY_SRC}-newdb-nonprod
-VDA_VER=2.2.8
-VDA_P="${PN}-${VDA_VER}-vda"
-RC_VER="2.2.9"
-
-DESCRIPTION="A fast and secure drop-in replacement for sendmail."
-HOMEPAGE="http://www.postfix.org/"
-SRC_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official/${MY_SRC}.tar.gz
- vda? ( http://web.onda.com.br/nadal/postfix/VDA/${VDA_P}.patch.gz ) "
-# devel? ( ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/${DEV_SRC}.tar.gz ) "
-
-LICENSE="IPL-1"
-SLOT="0"
-#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
-
-PROVIDE="virtual/mta virtual/mda"
-DEPEND="cdb? ( || ( >=dev-db/cdb-0.75-r1 >=dev-db/tinycdb-0.74 ) )
- >=sys-libs/db-3.2
- >=dev-libs/libpcre-3.4
- pam? ( virtual/pam )
- ldap? ( >=net-nds/openldap-1.2 )
- mysql? ( virtual/mysql )
- postgres? ( >=dev-db/postgresql-7.1 )
- ssl? ( >=dev-libs/openssl-0.9.6g )
- sasl? ( >=dev-libs/cyrus-sasl-2 )"
-RDEPEND="${DEPEND}
- >=net-mail/mailbase-0.00
- !mailwrapper? ( !virtual/mta )
- mailwrapper? ( >=net-mail/mailwrapper-0.2 )
- selinux? ( sec-policy/selinux-postfix )"
-
-#if use devel; then
-# MY_SRC=${DEV_SRC}
-#fi
-
-S=${WORKDIR}/${MY_SRC}
-
-group_user_check() {
- einfo "checking for postfix group... create if missing."
- enewgroup postfix 207
- einfo "checking for postdrop group... create if missing."
- enewgroup postdrop 208
- einfo "checking for postfix user... create if missing."
- enewuser postfix 207 -1 /var/spool/postfix postfix,mail
-}
-
-pkg_setup() {
- # do not upgrade from postfix-2.1. logic to fix bug #53324
- if [[ -f /var/lib/init.d/started/postfix ]] ; then
- if has_version '<mail-mta/postfix-2.2' ; then
- if [ "${FORCE_UPGRADE}" ]; then
- echo
- ewarn "You are upgrading from a incompatible version and"
- ewarn "you have FORCE_UPGRADE set, will build this package with postfix running."
- ewarn "You MUST stop postfix BEFORE install it to your system."
- echo
- else
- echo
- eerror "You are upgrading from a incompatible version."
- eerror "You MUST stop postfix BEFORE install it to your system."
- eerror "If you want a minimal downtime, emerge postfix with:"
- eerror "\`FORCE_UPGRADE=1 emerge --buildpkgonly postfix\`; then"
- eerror "\`/etc/init.d/postfix stop && emerge --usepkgonly postfix\`"
- eerror "run etc-update or dispatch-conf and merge the configuration files."
- eerror "Next /etc/init.d/postfix start"
- die "upgrade from an incompatible version!"
- echo
- fi
-
- else
- echo
- ewarn "It is safe to upgrade your current version while it's running."
- ewarn "If you don't want to take any chance; please hit Ctrl+C now;"
- ewarn "stop Postfix then emerge again."
- ewarn "You have been warned!"
- ewarn "Waiting 5 seconds before continuing."
- echo
- epause 5
- fi
- fi
-
- echo
- ewarn "Read \"ftp://ftp.porcupine.org/mirrors/postfix-release/official/${MY_SRC}.RELEASE_NOTES\""
- ewarn "for incompatible changes before continue."
- ewarn "Bugs should be filed at \"http://bugs.gentoo.org\""
- ewarn "assign to \"net-mail@gentoo.org\"."
- echo
- #epause 5
-
- # put out warnings to work around bug #45764
- if has_version '<=mail-mta/postfix-2.0.18'; then
- echo
- ewarn "You are upgrading from postfix-2.0.18 or earlier, one of the empty queue"
- ewarn "directory get deleted during unmerge the older version (#45764). Please run"
- ewarn "\`etc/postfix/post-install upgrade-source\` to recreate them."
- echo
- #epause 5
- fi
-
- #TLS non-prod warn
- if use ssl; then
- echo
- ewarn "you have \"ssl\" in your USE flags, TLS will be enabled."
- ewarn "This service entry is incompatible with previous TLS patch."
- ewarn "Visit http://www.postfix.org/TLS_README.html for more info."
- echo
- #epause 5
- fi
-
- # IPV6 non-prod warn
- if use ipv6; then
- echo
- ewarn "you have \"ipv6\" in your USE flags, IPV6 will be enabled."
- ewarn "Visit http://www.postfix.org/IPV6_README.html for more info."
- echo
- fi
-
- # add postfix, postdrop user/group. Bug #77565.
- group_user_check || die "failed to check/add needed user/group"
-
-}
-
-src_unpack() {
- unpack ${A} && cd "${S}"
-
- epatch "${FILESDIR}/${PN}-master.cf.patch"
-
- if use vda ; then
- epatch "${WORKDIR}/${VDA_P}.patch"
- fi
-
- # Postfix does not get the FQDN if no hostname is configured.
- epatch "${FILESDIR}/${PN}-2.0.9-get-FQDN.patch"
-
- sed -i -e "/^#define ALIAS_DB_MAP/s|hash:/etc/aliases|hash:/etc/mail/aliases|" \
- src/util/sys_defs.h || die "sed failed"
-
-}
-
-src_compile() {
- cd ${S}
- # added -Wl,-z,now wrt 62674.
- # remove -ldl as it is not necessary, resolve bug #106446.
- # -Wl,-z,now replaced by $(bindnow-flags)
- # make sure LDFLAGS get passed down to the executables.
- local mycc="-DHAS_PCRE" mylibs="$(bindnow-flags) ${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 -I/usr/include/mysql"
- mylibs="${mylibs} -lmysqlclient -lm -lz"
- fi
-
- if use postgres ; then
- if best_version '=dev-db/postgresql-7.3*' ; then
- mycc="${mycc} -DHAS_PGSQL -I/usr/include/postgresql"
- else
- mycc="${mycc} -DHAS_PGSQL -I/usr/include/postgresql/pgsql"
- fi
- mylibs="${mylibs} -lpq"
- fi
-
- if use ssl ; then
- mycc="${mycc} -DUSE_TLS"
- mylibs="${mylibs} -lssl -lcrypto"
- fi
-
- if use sasl ; then
- mycc="${mycc} -DUSE_SASL_AUTH -I/usr/include/sasl"
- mylibs="${mylibs} -lsasl2"
- 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"
- CDB_LIBS=""
-
- # tinycdb is preferred.
- if has_version dev-db/tinycdb; then
- einfo "build with dev-db/tinycdb"
- # ugly hack because gentoo doesn't install cdb.h
- cp /usr/include/tinycdb.h ${S}/src/util/cdb.h || die \
- "failed to cp /usr/include/tinycdb.h to ${S}/util/cdb.h"
- CDB_LIBS="-ltinycdb"
- else
- CDB_PATH="/usr/lib"
- 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/lib/postfix\\\""
- 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\\\""
-
- ebegin "Starting make makefiles..."
-
- local my_cc=$(tc-getCC)
- einfo "CC=${my_cc:=gcc}"
-
- # workaround for bug #76512
- [ "$(gcc-version)" == "3.4" ] && use hardened && replace-flags -O? -Os
-
- make CC="${my_cc:=gcc}" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
- makefiles || die "configure problem"
-
- emake || die "compile problem"
-}
-
-src_install () {
- /bin/sh postfix-install \
- -non-interactive \
- install_root="${D}" \
- config_directory="/usr/share/doc/${PF}/defaults" \
- readme_directory="/usr/share/doc/${PF}/readme" \
- || die "postfix-install failed"
-
- # Fix spool removal on upgrade.
- rm -rf "${D}/var"
- keepdir /var/spool/postfix
-
- # Install an rmail for UUCP, closing bug #19127.
- dobin auxiliary/rmail/rmail
-
- # mailwrapper stuff
- if use mailwrapper ; then
- mv "${D}/usr/sbin/sendmail" "${D}/usr/sbin/sendmail.postfix"
- mv "${D}/usr/bin/rmail" "${D}/usr/bin/rmail.postfix"
-
- mv "${D}/usr/share/man/man1/sendmail.1" \
- "${D}/usr/share/man/man1/sendmail-postfix.1"
- mv "${D}/usr/share/man/man1/newaliases.1" \
- "${D}/usr/share/man/man1/newaliases-postfix.1"
- mv "${D}/usr/share/man/man1/mailq.1" \
- "${D}/usr/share/man/man1/mailq-postfix.1"
- mv "${D}/usr/share/man/man5/aliases.5" \
- "${D}/usr/share/man/man5/aliases-postfix.5"
-
- insinto /etc/mail
- doins "${FILESDIR}/mailer.conf"
- else
- # Provide another link for legacy FSH.
- dosym /usr/sbin/sendmail /usr/lib/sendmail
- fi
-
- # Install qshape tool.
- dobin auxiliary/qshape/qshape.pl
-
- # performance tuning tools.
- 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.
- 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,post*-*} ${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"
-
- mv "${S}/examples" "${D}/usr/share/doc/${PF}/"
- dodoc *README COMPATIBILITY HISTORY INSTALL LICENSE PORTING RELEASE_NOTES*
- dohtml html/*
-
- pamd_mimic_system smtp auth account
-
- # do not install server.{key,pem) if they are exist.
- if use ssl && [[ ! -f /etc/ssl/postfix/server.key && ! -f /etc/ssl/postfix/server.pem ]]; then
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
- insinto /etc/ssl/postfix
- docert server
- fowners postfix:mail /etc/ssl/postfix/server.{key,pem}
- fi
-
- if use sasl ; then
- insinto /etc/sasl2
- newins "${FILESDIR}/smtp.sasl" smtpd.conf
- fi
-}
-
-pkg_postinst() {
-
- # add postfix, postdrop user/group. Bug #77565.
- group_user_check || die "failed to check/add needed user/group"
-
- ebegin "Fixing queue directories and permissions"
- "${ROOT}/etc/postfix/post-install" upgrade-permissions
- echo
- ewarn "If you upgraded from postfix-1.x, you must revisit"
- ewarn "your configuration files. See"
- ewarn " /usr/share/doc/${PF}/RELEASE_NOTES"
- ewarn "for a list of changes."
-
- if [ ! -e /etc/mail/aliases.db ] ; then
- echo
- 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."
- fi
-
- if ! use mailwrapper && [[ -e /etc/mailer.conf ]]
- then
- einfo
- einfo "Since you emerged $PN without mailwrapper in USE,"
- einfo "you probably want to 'emerge -C mailwrapper' now."
- einfo
- fi
-
-}
diff --git a/mail-mta/postfix/postfix-2.3.6.ebuild b/mail-mta/postfix/postfix-2.3.6.ebuild
deleted file mode 100644
index d17b4272ff4f..000000000000
--- a/mail-mta/postfix/postfix-2.3.6.ebuild
+++ /dev/null
@@ -1,387 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.3.6.ebuild,v 1.12 2007/10/21 23:34:55 mr_bones_ Exp $
-
-# NOTE: this ebuild is regular ebuild without mailer-config support
-# comment lines below "regular ebuild" and uncomment lines below "mailer-config support"
-# to turn this ebuild to mailer-config supported ebuild.
-
-# regular ebuild
-inherit eutils ssl-cert toolchain-funcs flag-o-matic pam
-# mailer-config support.
-#inherit eutils ssl-cert toolchain-funcs flag-o-matic mailer pam
-
-# regular ebuild.
-IUSE="ipv6 pam ldap mysql postgres ssl sasl dovecot-sasl mailwrapper mbox nis selinux hardened cdb vda"
-# mailer-config support.
-#IUSE="ipv6 pam ldap mysql postgres ssl sasl dovecot-sasl mbox nis selinux hardened cdb"
-
-MY_PV=${PV/_rc/-RC}
-MY_SRC=${PN}-${MY_PV}
-MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
-VDA_VER=2.3.3
-VDA_P="${PN}-${VDA_VER}-vda"
-RC_VER="2.2.9"
-
-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://web.onda.com.br/nadal/postfix/VDA/${VDA_P}.patch.gz ) "
-# devel? ( ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/${DEV_SRC}.tar.gz ) "
-
-LICENSE="IPL-1"
-SLOT="0"
-#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"
-
-# regular ebuild.
-PROVIDE="virtual/mta virtual/mda"
-# mailer-config support.
-#PROVIDE="${PROVIDE} virtual/mda"
-
-DEPEND="cdb? ( || ( >=dev-db/cdb-0.75-r1 >=dev-db/tinycdb-0.74 ) )
- >=sys-libs/db-3.2
- >=dev-libs/libpcre-3.4
- pam? ( virtual/pam )
- ldap? ( >=net-nds/openldap-1.2 )
- mysql? ( virtual/mysql )
- postgres? ( >=dev-db/postgresql-7.1 )
- ssl? ( >=dev-libs/openssl-0.9.6g )
- sasl? ( >=dev-libs/cyrus-sasl-2 )"
-
-# regular ebuild.
-RDEPEND="${DEPEND}
- >=net-mail/mailbase-0.00
- !mailwrapper? ( !virtual/mta )
- mailwrapper? ( >=net-mail/mailwrapper-0.2 )
- selinux? ( sec-policy/selinux-postfix )"
-
-# mailer-config support.
-#RDEPEND="${DEPEND}
-# >=net-mail/mailbase-0.00
-# selinux? ( sec-policy/selinux-postfix )"
-
-#if use devel; then
-# MY_SRC=${DEV_SRC}
-#fi
-
-S=${WORKDIR}/${MY_SRC}
-
-group_user_check() {
- einfo "checking for postfix group... create if missing."
- enewgroup postfix 207
- einfo "checking for postdrop group... create if missing."
- enewgroup postdrop 208
- einfo "checking for postfix user... create if missing."
- enewuser postfix 207 -1 /var/spool/postfix postfix,mail
-}
-
-pkg_setup() {
- # do not upgrade live from postfix <2.3.
- if [[ -f /var/lib/init.d/started/postfix ]] ; then
- if has_version '<mail-mta/postfix-2.3.0' ; then
- if [ "${FORCE_UPGRADE}" ]; then
- echo
- ewarn "You are upgrading from a incompatible version and"
- ewarn "you have FORCE_UPGRADE set, will build this package with postfix running."
- ewarn "You MUST stop postfix BEFORE install it to your system."
- echo
- else
- echo
- eerror "You are upgrading from a incompatible version."
- eerror "You MUST stop postfix BEFORE install it to your system."
- eerror "If you want a minimal downtime, emerge postfix with:"
- eerror "\`FORCE_UPGRADE=1 emerge --buildpkgonly postfix\`; then"
- eerror "\`/etc/init.d/postfix stop && emerge --usepkgonly postfix\`"
- eerror "run etc-update or dispatch-conf and merge the configuration files."
- eerror "Next /etc/init.d/postfix start"
- die "upgrade from an incompatible version!"
- echo
- fi
-
- else
- echo
- ewarn "It is safe to upgrade your current version while it's running."
- ewarn "If you don't want to take any chance; please hit Ctrl+C now;"
- ewarn "stop Postfix then emerge again."
- ewarn "You have been warned!"
- ewarn "Waiting 5 seconds before continuing."
- echo
- epause 5
- fi
- fi
-
- echo
- ewarn "Read \"ftp://ftp.porcupine.org/mirrors/postfix-release/official/${MY_SRC}.RELEASE_NOTES\""
- ewarn "for incompatible changes before continue."
- ewarn "Bugs should be filed at \"http://bugs.gentoo.org\""
- ewarn "assign to \"net-mail@gentoo.org\"."
- echo
- #epause 5
-
- # put out warnings to work around bug #45764
- if has_version '<=mail-mta/postfix-2.0.18'; then
- echo
- ewarn "You are upgrading from postfix-2.0.18 or earlier, one of the empty queue"
- ewarn "directory get deleted during unmerge the older version (#45764). Please run"
- ewarn "\`etc/postfix/post-install upgrade-source\` to recreate them."
- echo
- #epause 5
- fi
-
- #TLS non-prod warn
- if use ssl; then
- echo
- ewarn "you have \"ssl\" in your USE flags, TLS will be enabled."
- ewarn "This service entry is incompatible with previous TLS patch."
- ewarn "Visit http://www.postfix.org/TLS_README.html for more info."
- echo
- #epause 5
- fi
-
- # IPV6 non-prod warn
- if use ipv6; then
- echo
- ewarn "you have \"ipv6\" in your USE flags, IPV6 will be enabled."
- ewarn "Visit http://www.postfix.org/IPV6_README.html for more info."
- echo
- fi
-
- if use sasl ; then
- echo
- elog "postfix 2.3 supports two SASL implementations."
- elog "Cyrus SASL and Dovecot protocol version 1 (server only)"
- elog "detail at http://www.postfix.org/SASL_README.html"
- echo
- fi
-
- # add postfix, postdrop user/group. Bug #77565.
- group_user_check || die "failed to check/add needed user/group"
-}
-
-src_unpack() {
- unpack ${A} && cd "${S}"
-
- epatch "${FILESDIR}/${PN}-master.cf.patch"
-
- if use vda ; then
- epatch "${WORKDIR}/${VDA_P}.patch"
- fi
-
- # Postfix does not get the FQDN if no hostname is configured.
- epatch "${FILESDIR}/${PN}-2.0.9-get-FQDN.patch"
-
- sed -i -e "/^#define ALIAS_DB_MAP/s|hash:/etc/aliases|hash:/etc/mail/aliases|" \
- src/util/sys_defs.h || die "sed failed"
-
-}
-
-src_compile() {
- cd ${S}
- # added -Wl,-z,now wrt 62674.
- # remove -ldl as it is not necessary, resolve bug #106446.
- # -Wl,-z,now replaced by $(bindnow-flags)
- # make sure LDFLAGS get passed down to the executables.
- local mycc="-DHAS_PCRE" mylibs="$(bindnow-flags) ${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 -I/usr/include/mysql"
- mylibs="${mylibs} -lmysqlclient -lm -lz"
- fi
-
- if use postgres ; then
- if best_version '=dev-db/postgresql-7.3*' ; then
- mycc="${mycc} -DHAS_PGSQL -I/usr/include/postgresql"
- else
- mycc="${mycc} -DHAS_PGSQL -I/usr/include/postgresql/pgsql"
- fi
- mylibs="${mylibs} -lpq"
- 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"
- CDB_LIBS=""
-
- # tinycdb is preferred.
- if has_version dev-db/tinycdb; then
- einfo "build with dev-db/tinycdb"
- # ugly hack because gentoo doesn't install cdb.h
- cp /usr/include/tinycdb.h ${S}/src/util/cdb.h || die \
- "failed to cp /usr/include/tinycdb.h to ${S}/util/cdb.h"
- CDB_LIBS="-ltinycdb"
- else
- CDB_PATH="/usr/lib"
- 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/lib/postfix\\\""
- 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\\\""
-
- ebegin "Starting make makefiles..."
-
- local my_cc=$(tc-getCC)
- einfo "CC=${my_cc:=gcc}"
-
- # workaround for bug #76512
- [ "$(gcc-version)" == "3.4" ] && use hardened && replace-flags -O? -Os
-
- make DEBUG="" CC="${my_cc:=gcc}" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
- makefiles || die "configure problem"
-
- emake || die "compile problem"
-}
-
-src_install () {
- /bin/sh postfix-install \
- -non-interactive \
- install_root="${D}" \
- config_directory="/usr/share/doc/${PF}/defaults" \
- readme_directory="/usr/share/doc/${PF}/readme" \
- || die "postfix-install failed"
-
- # Fix spool removal on upgrade.
- rm -rf "${D}/var"
- keepdir /var/spool/postfix
-
- # Install an rmail for UUCP, closing bug #19127.
- dobin auxiliary/rmail/rmail
-
- # mailwrapper stuff
- if use mailwrapper ; then
- mv "${D}/usr/sbin/sendmail" "${D}/usr/sbin/sendmail.postfix"
- mv "${D}/usr/bin/rmail" "${D}/usr/bin/rmail.postfix"
- # mailer-config support
- #rm "${D}/usr/bin/mailq" "${D}/usr/bin/newaliases"
-
- mv "${D}/usr/share/man/man1/sendmail.1" \
- "${D}/usr/share/man/man1/sendmail-postfix.1"
- mv "${D}/usr/share/man/man1/newaliases.1" \
- "${D}/usr/share/man/man1/newaliases-postfix.1"
- mv "${D}/usr/share/man/man1/mailq.1" \
- "${D}/usr/share/man/man1/mailq-postfix.1"
- mv "${D}/usr/share/man/man5/aliases.5" \
- "${D}/usr/share/man/man5/aliases-postfix.5"
-
- # regular ebuild.
- insinto /etc/mail
- doins "${FILESDIR}/mailer.conf"
- # mailer-config support
- #mailer_install_conf
- else
- # Provide another link for legacy FSH.
- dosym /usr/sbin/sendmail /usr/lib/sendmail
- fi
-
- # Install qshape tool.
- dobin auxiliary/qshape/qshape.pl
-
- # performance tuning tools.
- 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.
- 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,post*-*} ${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"
-
- mv "${S}/examples" "${D}/usr/share/doc/${PF}/"
- dodoc *README COMPATIBILITY HISTORY INSTALL LICENSE PORTING RELEASE_NOTES*
- dohtml html/*
-
- pamd_mimic_system smtp auth account
-
- # do not install server.{key,pem) if they are exist.
- if use ssl && [[ ! -f /etc/ssl/postfix/server.key && ! -f /etc/ssl/postfix/server.pem ]]; then
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
- insinto /etc/ssl/postfix
- docert server
- fowners postfix:mail /etc/ssl/postfix/server.{key,pem}
- fi
-
- if use sasl ; then
- insinto /etc/sasl2
- newins "${FILESDIR}/smtp.sasl" smtpd.conf
- fi
-}
-
-pkg_postinst() {
- # add postfix, postdrop user/group. Bug #77565.
- group_user_check || die "failed to check/add needed user/group"
-
- ebegin "Fixing queue directories and permissions"
- "${ROOT}/etc/postfix/post-install" upgrade-permissions
- echo
- ewarn "If you upgraded from postfix-1.x, you must revisit"
- ewarn "your configuration files. See"
- ewarn " /usr/share/doc/${PF}/RELEASE_NOTES"
- ewarn "for a list of changes."
-
- if [ ! -e /etc/mail/aliases.db ] ; then
- echo
- 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."
- fi
-
- # regular ebuild
- if ! use mailwrapper && [[ -e /etc/mailer.conf ]]
- then
- einfo
- einfo "Since you emerged $PN without mailwrapper in USE,"
- einfo "you probably want to 'emerge -C mailwrapper' now."
- einfo
- fi
- # mailer-config support
- #mailer_pkg_postinst
-}