diff options
author | Eray Aslan <eras@gentoo.org> | 2013-09-07 08:44:05 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2013-09-07 08:44:05 +0000 |
commit | 951cce5ce4463183db37beecbcfc24e62c70a899 (patch) | |
tree | 1ec4c982077f7ed61959b9ec2368588e1a0ff5d1 /mail-mta | |
parent | Fix building without berkeleydb (diff) | |
download | historical-951cce5ce4463183db37beecbcfc24e62c70a899.tar.gz historical-951cce5ce4463183db37beecbcfc24e62c70a899.tar.bz2 historical-951cce5ce4463183db37beecbcfc24e62c70a899.zip |
Version bump
Package-Manager: portage-2.2.1/cvs/Linux x86_64
Manifest-Sign-Key: 0x77F1F175586A3B1F
Diffstat (limited to 'mail-mta')
-rw-r--r-- | mail-mta/postfix/ChangeLog | 7 | ||||
-rw-r--r-- | mail-mta/postfix/Manifest | 30 | ||||
-rw-r--r-- | mail-mta/postfix/postfix-2.10.2.ebuild | 314 |
3 files changed, 336 insertions, 15 deletions
diff --git a/mail-mta/postfix/ChangeLog b/mail-mta/postfix/ChangeLog index 368ec71addc2..c52c08491eac 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.461 2013/09/07 08:43:12 eras Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.462 2013/09/07 08:44:04 eras Exp $ + +*postfix-2.10.2 (07 Sep 2013) + + 07 Sep 2013; Eray Aslan <eras@gentoo.org> +postfix-2.10.2.ebuild: + Version bump 07 Sep 2013; Eray Aslan <eras@gentoo.org> postfix-2.11_pre20130825.ebuild: Fix building without berkeleydb diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest index 5e7c00f91710..13a0c3f77d02 100644 --- a/mail-mta/postfix/Manifest +++ b/mail-mta/postfix/Manifest @@ -7,28 +7,30 @@ AUX smtp.pass 141 SHA256 c9b3b56a8df2367cc15bc43a70304fac7ebdd7697e1d450d1bcb4bf 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.10.1.tar.gz 3827595 SHA256 2e85a62e97418bbb022b4d4433098a7f25adc7dc707c37d9984db2c2f314b1c1 SHA512 34d5923748b38dd93609657011adc1371ab738ee86558aa4822cce6e879ccdd426bb4de994ab425b3a2745c8ca10a01b2d1c5f310872e839f9627afa8dcccdf0 WHIRLPOOL d1e6c029429e6ec2249b58cfa035a8819456557655711fe8d81ea9cfbd22fd66837be509e8b0f458ee6680330b1c5cf1c6fc580b75b2df6aeb30cb94cf478031 +DIST postfix-2.10.2.tar.gz 3828326 SHA256 f1a735a5a9ffeac8fca59046c437c3b76e7f923fb4249db2a55b2bff0306ddd4 SHA512 fa6c123da040a8e332c0bf2430f5b098523c2eff42a6cf4bfe6618b82d59be8e5a7f5c85b09ab8fd0312058b2135b174e00890423e4d3f8f732c3dc3c91f01c3 WHIRLPOOL 4e1e453ecd653058faf7420d6bfb6ac6a6c343f03f9c1a4213c403a7164d99f659a0b9ba744b803c3d94cfaf3216d3505f44d22069421f6cc4a4651b6be1f316 DIST postfix-2.11-20130825.tar.gz 3959547 SHA256 75d5cb3529c2eb88fa9a8e3465691941a5c66344825c3e450cf6c798bed5a970 SHA512 c5fd70d87ad92c8827bc2cd962bb7891d50cbfb99f0f8615a01c8b78132ac2802963cc7ad129a44ad54806a8a350c8b52a638eb0a9b146810b9783b69c278c84 WHIRLPOOL c3cb509fb08af27ee5784bb17a739df3e07b2a9d0681efc360d72599ceb32f2289709c1c0e01998644561b25a410a30eb4a31b685ab6c114b7aa02a68b6a2bf2 DIST postfix-vda-v11-2.9.5.patch 55009 SHA256 df30379c456971a514ae5587531bb5cd8492921a6a27e6d23f5014a1434945aa SHA512 c44497536e2bc313f2301e799a6614f396fc7bb06ef31493460edc59b0922b4d9a24802a84e2b8cf158277f5b0c8c59b53a4f8ef6896ee1e2ba538c562687010 WHIRLPOOL 70c438d2e98aaae6ebd37fadb5d5d0cbe3b31baf2119657009802be62bfeef7dc6a6e62fc8259bfe635ccbf4b0c8ffa17b35a04648c6c138575dda8314a28744 DIST postfix-vda-v13-2.10.0.patch 55701 SHA256 6208021eb0b37ac6482e334e538ed5700cc22c4d4dd66ed9e975ae5f20bf935f SHA512 0b4b53a8cd28abf56eee3b2ed63ca1814251b60816e6ca1143249d25fd6ef7f905bec3134125ac6e851af685db8aae878012113693261529ae2ddbcf1bd93e62 WHIRLPOOL d98b7d2177b8b69738086880fd08c336fa60b99ff7413624e628fd5f17be2064f2ccaa37c047d3013ed41c0ff1bcb76e7962f8390c4179f28ab11733dd3b59d3 EBUILD postfix-2.10.0.ebuild 10381 SHA256 e2bfafb98afdfc9c8f3e36a2dbfb0bb466d3e2f2bb0c188c3af7f34d684754d9 SHA512 9a7ff4685cc69095c527314d70003cb543c9b6951c92129bfd91def0bd0e84bcee666404a36f00b6f75290ce79784146a049bdb5009ea3f346afb5608c325623 WHIRLPOOL 3fc14e1b125f81ea11d420448718d050cabe1da95e823fcd7ee4267a9a3fd6b8c8955f5601d236f649ad819d0acf0cb27e0f9d49bf5c9f7865c1ceadd457a816 EBUILD postfix-2.10.1.ebuild 9624 SHA256 d47ac79a5780d62239f23f1802b40326e9f39e459110d298dfc997523a415219 SHA512 c53e7010626bef1ca334dfa56e917fc68faf53f4bef3f922717f1f922871bcbba61c6cc5b86678993235ea9ee51b3ad446c12eadf5a88b790d10176700c41728 WHIRLPOOL 91d3b373cbc19603d785f6c07a1dfc2f7155e2bf3680a4503afa7d6f0219398593105f6eefb7b2a7f97b3add41313f2c8bdd201e8b3ea434083fa6828faf02c7 +EBUILD postfix-2.10.2.ebuild 9634 SHA256 fea9cd70e43f13335d294a4f29907d33f3aaf38b670be7f185aca1b2769c4237 SHA512 c77e24c58a93c3190adb055764b2631110a469921387442bc93a7210b46f93ba44b775f2059a67dbfa96def3d989e2d5ae0b8b4c2a3cea93520643cd07571152 WHIRLPOOL 0ea0b76b5ba38becbd96b09517f26ea20adc4178d584d1a21d9df4ab6f3b6405cf96bc5a13780c47ec769248b8ebcc8f5e009fabb82a48a1711665f43a646d6e EBUILD postfix-2.11_pre20130825.ebuild 9648 SHA256 ccfe7c4d3e285984d13b79077c8ce9b50eb4db6517029c96c59942e527d75746 SHA512 4183ac924ec2a4e3f5aa4dfe72b813d94921efa1c1cf392f34c5e0e74b85e2585a30be9170d25839849ca44b7cf7f2b07b367342044c7526d5df3d68611e1fab WHIRLPOOL 4f117958e4a20ebe50b15338fc9d7d0449ec55ea447771fae5ed7f8c030b241d8f59d82f86fceae632936f990ce9e177edc9f08d828e831f247f2b02d4bc88e0 -MISC ChangeLog 96701 SHA256 72754950f6011ff24dea6b15b23ebb4246f826aeeac3f394e5f3585cbb2db41d SHA512 f307a515a1f8ceb581df840b280124362daf00c19bb447dd25b1ffc6f2f7a5ed2a135debdaba70862be7da657f86221616eaabf849c974a3b0fd3041b2534804 WHIRLPOOL 81c3dee6e8ac10d9cbc15553afad6ad4dbf0ed4aa7420f557bbf71d9d8a401ab22b50d8df0edd182aa38bd8b5144e11e83fcc4c7f647baae34479f6948b29399 +MISC ChangeLog 96816 SHA256 e23f46ef138ccc3bba207604ab735c15c49b6fce3708594a9fd1add4304fe255 SHA512 2c3c516a2aca81964045d17e4ece570c4699cf59cd23059842c73eb48a454f0f047de16f59caaaf9cb694614b451c5268e767860d8dd444a756b8a5e8280ffc0 WHIRLPOOL c82b31c23b2bc4acddd99764dc014d355747df8e41b168d2721d823857444a90c2fc9382f80d9c14d3ea89ec8cc22c567a26a0a6ceae7b6e453094310df68995 MISC metadata.xml 610 SHA256 00b7ef524664b20a9df7642573745b1d17b0b51f005ffd150ac6dccba38dee88 SHA512 fd446f288b11070e2d6b5dad3ec259a889508c3c7f4755ea2ceda18500844e065ddc2bbce5f4108b30ebacff76443ea8a23805c21d39c2bf72210f801adcfe06 WHIRLPOOL 815ae4ddbaca96871454d44adbe3bec4a081d857c61b07cd0e382ce0d44503421a4ad156da6009cc91f24855b7c1d8adfe3fbd48c82833f9d82c1afaf798072e -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (GNU/Linux) -iQIcBAEBCAAGBQJSKucrAAoJEHfx8XVYajsfeYYP/AsK8zPEdf8l0b9mDpICR0SM -vXy7kBe98FIvDaa2A3Ig3MbYpfGVYgL77TIlYk/9ZikLXCZd5i36Q/hP8YWKfVvV -N8yYGjL2iirvqo+OLhfDsNcb9wtS091oSoGUtN4vnJ1wyKuWNdQmne8K9sNEtXvT -DN1hiIkmQpUu41U4ckcKMQ6eqfEPRUHVAJfQ5tPgfnpUJSjq43x47yom0nd0jcfZ -F238jlWBNEZmwjhvp80HyFXWQoOefyyXs/9RNQ/6iaPNVzmSw8ecK4Tvj40DyzbB -UWt8nH8P16vPzWSCGf3NtV3mF/cfPVDq1Uq8nMGehS0dxPGwCLDbmb215hg/M0hz -xMeCvVA6cGScdtIuwretecJsGo91vZgIuCwUD9eQX3lFS7K5ANTVYqWQzkrM8Of6 -0L6hvqPA2RjH1l8HHuZr5r4+vBy7VGOqe6Wv0CrZA0tVW176DliFlpnWjRV1ddbF -xjvX5q7V50CUiU13TZhzOaqYNtESWjrQ9EF0rulqcCFenqDWUUZDNNwyzL/CPKyt -ibMjSWBN12naRS89pdGF/kwDMn5EoSd4afKVk9ohTXnO4sixHBOSsTDuegRy88pZ -fzkVVmbQ8o5WbOncIGzYQnxI9i4NO5t7sJy65vHJz3wjrPqMee0/0AoXgC7h7QOB -aQfQMudnjF8GGNFULr/B -=Zq4f +iQIcBAEBCAAGBQJSKudVAAoJEHfx8XVYajsfKgYP/1dI9Ds1HsX6IU0J77uV4MUO +a4O6ilm8Uis08e7JuA89qVC1fYlVjcqb6SiotmDD781F9bAaLslazo9G/05CZqUw +ucchb/ZpCLPQIMR3l85gVE2QJZG8UVyZWDrQdPK17j5Hfih/Fco+zesMh27UG0RI +2GilVLYVvMXerhqyO2PjEYijJGjTPU9ruzm46AVEvSBxXWIn+B9NPTeF9Df+KfXp +rLYOo0bKFQ5VDyFee0EE+IKHCTO396LvIK76ENUff5cX7ijIKvgl6OqFznQFB8D/ +m71ydpOt77dFcStgyRLiHCUsrLa0V72fCwkYCN9jbPP5IYjxvEtjz+L+hC8LaiZT +OeceA8ITis/6xzd3aizKEBZTyVEaAeSirxC6FtfHldPo9CQxer6qc8jl+xlheV/2 +1QK7tbdjRpU4BQXtKyXdqpYskf4wODsi1kesstlsdWfXhOVkpOx2or72glkItmgW +qbqg1sOAKmUFIpdHunDzgCUlpxHmugoA8ukuHdD7wyNgJIvBCpNAe+xBR7xAUKsQ +dxbB6FdiPHvY2FQrmlj6Uir++i2jfwhRyOJTi6c25X6IJ/OuUtk9q0pToWakA5zb +MxOc/D4wneRNaHWFeVM26ckGJ8IKthYOGW0xvgbEE6vzc2iM+C9r3FBDE7Ekh7f0 +OjG199aMhY6BBSllXJVL +=dsXI -----END PGP SIGNATURE----- diff --git a/mail-mta/postfix/postfix-2.10.2.ebuild b/mail-mta/postfix/postfix-2.10.2.ebuild new file mode 100644 index 000000000000..8d091fd97fe7 --- /dev/null +++ b/mail-mta/postfix/postfix-2.10.2.ebuild @@ -0,0 +1,314 @@ +# 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.10.2.ebuild,v 1.1 2013/09/07 08:44:04 eras Exp $ + +EAPI=5 +inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam user versionator systemd + +MY_PV="${PV/_pre/-}" +MY_SRC="${PN}-${MY_PV}" +MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" +VDA_PV="2.10.0" +VDA_P="${PN}-vda-v13-${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/opensmtpd + !<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 + + 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} + + systemd_dounit "${FILESDIR}/${PN}.service" +} + +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 + } +} + +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 +} |