diff options
author | Eray Aslan <eras@gentoo.org> | 2012-11-02 15:13:27 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2012-11-02 15:13:27 +0000 |
commit | 564c30029599aa987ca9ddd5b6e49c7d363831d2 (patch) | |
tree | adcfccaa67de71e8b71815b7ece310eaca067e99 /mail-mta | |
parent | Take over as this needs to work for office all the time. Cpp/chromium teams, ... (diff) | |
download | gentoo-2-564c30029599aa987ca9ddd5b6e49c7d363831d2.tar.gz gentoo-2-564c30029599aa987ca9ddd5b6e49c7d363831d2.tar.bz2 gentoo-2-564c30029599aa987ca9ddd5b6e49c7d363831d2.zip |
Add smtpd_relay_restrictions compatibility shim
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 0x77F1F175586A3B1F)
Diffstat (limited to 'mail-mta')
-rw-r--r-- | mail-mta/postfix/ChangeLog | 5 | ||||
-rw-r--r-- | mail-mta/postfix/postfix-2.10_pre20121022.ebuild | 19 |
2 files changed, 22 insertions, 2 deletions
diff --git a/mail-mta/postfix/ChangeLog b/mail-mta/postfix/ChangeLog index da36bc48c6cf..5f6172d3e460 100644 --- a/mail-mta/postfix/ChangeLog +++ b/mail-mta/postfix/ChangeLog @@ -1,6 +1,9 @@ # 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.396 2012/10/30 19:38:28 eras Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.397 2012/11/02 15:13:27 eras Exp $ + + 02 Nov 2012; Eray Aslan <eras@gentoo.org> postfix-2.10_pre20121022.ebuild: + Add smtpd_relay_restrictions compatibility shim 30 Oct 2012; Eray Aslan <eras@gentoo.org> -files/postfix-2.9.3-freebsd9.patch, -files/postfix.rc6.2.6, -postfix-2.8.10.ebuild, -postfix-2.8.11.ebuild, diff --git a/mail-mta/postfix/postfix-2.10_pre20121022.ebuild b/mail-mta/postfix/postfix-2.10_pre20121022.ebuild index 9922c7d9d7a0..7f6ff72764be 100644 --- a/mail-mta/postfix/postfix-2.10_pre20121022.ebuild +++ b/mail-mta/postfix/postfix-2.10_pre20121022.ebuild @@ -1,6 +1,6 @@ # 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.10_pre20121022.ebuild,v 1.1 2012/10/23 07:44:28 eras Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.10_pre20121022.ebuild,v 1.2 2012/11/02 15:13:27 eras Exp $ EAPI=4 inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam user versionator @@ -262,6 +262,7 @@ src_install () { } 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. @@ -278,6 +279,22 @@ pkg_preinst() { 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 ]] && { + if [[ ! -n "$(${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() { |