Hello community, here is the log from the commit of package postfix for openSUSE:Factory checked in at 2015-02-06 10:53:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/postfix (Old) and /work/SRC/openSUSE:Factory/.postfix.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "postfix" Changes: -------- --- /work/SRC/openSUSE:Factory/postfix/postfix.changes 2015-01-30 06:03:52.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.postfix.new/postfix.changes 2015-02-06 10:53:23.000000000 +0100 @@ -1,0 +2,6 @@ +Thu Jan 22 09:36:09 UTC 2015 - [email protected] + +- bnc#914086 syntax error in config.postfix +- Adapt config.postfix to be able to run on SLE11 too. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ postfix-SuSE.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/postfix-SuSE/config.postfix new/postfix-SuSE/config.postfix --- old/postfix-SuSE/config.postfix 2015-01-13 08:04:07.000000000 +0100 +++ new/postfix-SuSE/config.postfix 2015-01-22 10:35:38.000000000 +0100 @@ -1,10 +1,16 @@ #! /bin/bash # Copyright (c) 1999-2001 SuSE GmbH Nuernberg, Germany. # Copyright (c) 2002-2004 SuSE Linux AG +# Copyright (c) 2015 SUSE Linux GmbH # # Author: Carsten Hoeger <[email protected]> +# Author: Peter Varkoly <[email protected]> export LC_ALL=POSIX +export RUN="/var/run/" +if [ -d /run ]; then + export RUN="/run" +fi cpifnewer(){ # remove files, that do no longer exist @@ -71,10 +77,10 @@ PF_CHROOT="/var/spool/postfix" if [ ! -d "$PF_CHROOT" ]; then - warn_user "\t$PF_CHROOT does not exist!!!\n\ + warn_user "\t$PF_CHROOT does not exist!!!\n\ \tThis should not happen!\n\ \tPlease reinstall package postfix or create this directory!" - exit 1 + exit 1 fi cd "$PF_CHROOT" @@ -92,8 +98,8 @@ fi fi if [ "$(echo "$POSTFIX_SMTP_AUTH_SERVER" | tr 'A-Z' 'a-z' )" != "no" ]; then - SASL_SOCKET_DIR="/run/sasl2" - CHR_SASL_SOCKET_DIR="run/sasl2" + SASL_SOCKET_DIR="$RUN/sasl2" + CHR_SASL_SOCKET_DIR="run/sasl2" fi if [ "$(echo "$POSTFIX_CHROOT" | tr 'A-Z' 'a-z' )" != "yes" ]; then # tidy-up in any case, to be safe (bnc#837561) @@ -118,126 +124,125 @@ rm -rvf etc @lib@ usr var proc else - echo "checking postfix chroot environment..." + echo "checking postfix chroot environment..." - if [ -e /lib/security/pam_ldap.so ]; then - cpifnewer /etc/openldap/ldap.conf etc/openldap - fi + if [ -e /lib/security/pam_ldap.so ]; then + cpifnewer /etc/openldap/ldap.conf etc/openldap + fi - if [ "$(echo "$POSTFIX_WITH_MYSQL" | tr 'A-Z' 'a-z' )" != "yes" ]; then - if [ -n "$CHR_MYSQL_SOCKET_DIR" ]; then - if grep "$PF_CHROOT"/$CHR_MYSQL_SOCKET_DIR /proc/mounts &> /dev/null; then - umount "$PF_CHROOT"/$CHR_MYSQL_SOCKET_DIR - fi - fi - fi + if [ "$(echo "$POSTFIX_WITH_MYSQL" | tr 'A-Z' 'a-z' )" != "yes" ]; then + if [ -n "$CHR_MYSQL_SOCKET_DIR" ]; then + if grep "$PF_CHROOT"/$CHR_MYSQL_SOCKET_DIR /proc/mounts &> /dev/null; then + umount "$PF_CHROOT"/$CHR_MYSQL_SOCKET_DIR + fi + fi + fi - if [ "$(echo "$POSTFIX_MYSQL_CONN" | tr 'A-Z' 'a-z' )" == "socket" -a \ - "$(echo "$POSTFIX_WITH_MYSQL" | tr 'A-Z' 'a-z' )" != "no" ]; then - if [ ! -d $CHR_MYSQL_SOCKET_DIR ]; then - mkdir -p $CHR_MYSQL_SOCKET_DIR - fi - if ! grep $CHR_MYSQL_SOCKET_DIR /proc/mounts &> /dev/null; then - mount -o bind $MYSQL_SOCKET_DIR "$PF_CHROOT"/$CHR_MYSQL_SOCKET_DIR - fi - fi + if [ "$(echo "$POSTFIX_MYSQL_CONN" | tr 'A-Z' 'a-z' )" == "socket" -a \ + "$(echo "$POSTFIX_WITH_MYSQL" | tr 'A-Z' 'a-z' )" != "no" ]; then + if [ ! -d $CHR_MYSQL_SOCKET_DIR ]; then + mkdir -p $CHR_MYSQL_SOCKET_DIR + fi + if ! grep $CHR_MYSQL_SOCKET_DIR /proc/mounts &> /dev/null; then + mount -o bind $MYSQL_SOCKET_DIR "$PF_CHROOT"/$CHR_MYSQL_SOCKET_DIR + fi + fi - if [ "$(echo "$POSTFIX_SMTP_AUTH_SERVER" | tr 'A-Z' 'a-z' )" != "no" ]; then - if [ ! -d $CHR_SASL_SOCKET_DIR ]; then - mkdir -p $CHR_SASL_SOCKET_DIR - fi - if ! grep $CHR_SASL_SOCKET_DIR /proc/mounts &> /dev/null; then - mount -o bind $SASL_SOCKET_DIR "$PF_CHROOT"/$CHR_SASL_SOCKET_DIR - fi - fi + if [ "$(echo "$POSTFIX_SMTP_AUTH_SERVER" | tr 'A-Z' 'a-z' )" != "no" ]; then + if [ ! -d $CHR_SASL_SOCKET_DIR ]; then + mkdir -p $CHR_SASL_SOCKET_DIR + fi + if ! grep $CHR_SASL_SOCKET_DIR /proc/mounts &> /dev/null; then + mount -o bind $SASL_SOCKET_DIR "$PF_CHROOT"/$CHR_SASL_SOCKET_DIR + fi + fi - # smtpd_tls_CApath - CAPATH=`postconf -h smtpd_tls_CApath` - if [ "$CAPATH" ] - then - cpifnewer "$CAPATH/*" ./$CAPATH - rsync -avH --copy-unsafe-links /etc/ssl/certs ./etc/ssl - fi - # smtpd_tls_CAfile - smtpd_tls_CAfile=`postconf -h smtpd_tls_CAfile` - if [ "$smtpd_tls_CAfile" ] - then - DIR=`dirname $smtpd_tls_CAfile` - cpifnewer $smtpd_tls_CAfile ./$DIR - fi - # smtpd_tls_cert_file - smtpd_tls_cert_file=`postconf -h smtpd_tls_cert_file` - if [ "$smtpd_tls_cert_file" ] - then - DIR=`dirname $smtpd_tls_cert_file` - cpifnewer $smtpd_tls_cert_file ./$DIR - fi - # smtpd_tls_key_file - smtpd_tls_key_file=`postconf -h smtpd_tls_key_file` - if [ -n "$smtpd_tls_key_file" ]; then - if [ "$smtpd_tls_key_file" -a $smtpd_tls_key_file != '$smtpd_tls_cert_file' ] - then - DIR=`dirname $smtpd_tls_key_file` - cpifnewer $smtpd_tls_key_file ./$DIR - fi - fi + # smtpd_tls_CApath + CAPATH=`postconf -h smtpd_tls_CApath` + if [ "$CAPATH" ] + then + cpifnewer "$CAPATH/*" ./$CAPATH + rsync -avH --copy-unsafe-links /etc/ssl/certs ./etc/ssl + fi + # smtpd_tls_CAfile + smtpd_tls_CAfile=`postconf -h smtpd_tls_CAfile` + if [ "$smtpd_tls_CAfile" ] + then + DIR=`dirname $smtpd_tls_CAfile` + cpifnewer $smtpd_tls_CAfile ./$DIR + fi + # smtpd_tls_cert_file + smtpd_tls_cert_file=`postconf -h smtpd_tls_cert_file` + if [ "$smtpd_tls_cert_file" ] + then + DIR=`dirname $smtpd_tls_cert_file` + cpifnewer $smtpd_tls_cert_file ./$DIR + fi + # smtpd_tls_key_file + smtpd_tls_key_file=`postconf -h smtpd_tls_key_file` + if [ -n "$smtpd_tls_key_file" ]; then + if [ "$smtpd_tls_key_file" -a $smtpd_tls_key_file != '$smtpd_tls_cert_file' ] + then + DIR=`dirname $smtpd_tls_key_file` + cpifnewer $smtpd_tls_key_file ./$DIR + fi + fi - # PAM - cpifnewer "/etc/pam.d/*" etc/pam.d - cpifnewer "/@lib@/security/*" @lib@/security - cpifnewer "/@lib@/libpam*" @lib@ - cpifnewer "/usr/@lib@/libcrack.so*" usr/@lib@ - - # SASL - cpifnewer /etc/sasldb2 etc - cpifnewer "/etc/sasl2/*" etc/sasl2 - cpifnewer "/usr/@lib@/sasl2/*" usr/@lib@/sasl2 - cpifnewer "/usr/@lib@/libsasl2*" usr/@lib@ - - # CYRUS - mkdir -p var/lib/imap/socket/ - ln -f /var/lib/imap/socket/lmtp var/lib/imap/socket/lmtp - - cpifnewer "/@lib@/libnss*" @lib@ - cpifnewer "/@lib@/libresolv*" @lib@ - cpifnewer "/@lib@/libdb*" @lib@ - cpifnewer "/@lib@/libxcrypt*" @lib@ - - cpifnewer /etc/host.conf etc - cpifnewer /etc/nsswitch.conf etc - cpifnewer /etc/resolv.conf etc - cpifnewer /etc/services etc - cpifnewer /etc/hosts etc - cpifnewer /etc/passwd etc - - if [ -L /etc/localtime ]; then - if [ -z "$TIMEZONE" -o "$TIMEZONE" == "YAST_ASK" ]; then - warn_user "\tUnable to setup your timezone!\n\ + # PAM + cpifnewer "/etc/pam.d/*" etc/pam.d + cpifnewer "/@lib@/security/*" @lib@/security + cpifnewer "/@lib@/libpam*" @lib@ + cpifnewer "/usr/@lib@/libcrack.so*" usr/@lib@ + + # SASL + cpifnewer /etc/sasldb2 etc + cpifnewer "/etc/sasl2/*" etc/sasl2 + cpifnewer "/usr/@lib@/sasl2/*" usr/@lib@/sasl2 + cpifnewer "/usr/@lib@/libsasl2*" usr/@lib@ + + # CYRUS + mkdir -p var/lib/imap/socket/ + ln -f /var/lib/imap/socket/lmtp var/lib/imap/socket/lmtp + + cpifnewer "/@lib@/libnss*" @lib@ + cpifnewer "/@lib@/libresolv*" @lib@ + cpifnewer "/@lib@/libdb*" @lib@ + cpifnewer "/@lib@/libxcrypt*" @lib@ + + cpifnewer /etc/host.conf etc + cpifnewer /etc/nsswitch.conf etc + cpifnewer /etc/resolv.conf etc + cpifnewer /etc/services etc + cpifnewer /etc/hosts etc + cpifnewer /etc/passwd etc + + if [ -L /etc/localtime ]; then + if [ -z "$TIMEZONE" -o "$TIMEZONE" == "YAST_ASK" ]; then + warn_user "\tUnable to setup your timezone!\n\ \tThe logging of the current time in /var/log/mail may be wrong!\n\ \tPlease set the variable TIMEZONE in /etc/sysconfig/clock!" - else - mkdir -p usr/share/zoneinfo/$(dirname $TIMEZONE) - if [ ! -e /usr/share/zoneinfo/$TIMEZONE ]; then - warn_user "\t$TIMEZONE is not a regular timezone or the corresponding\n\ + else + mkdir -p usr/share/zoneinfo/$(dirname $TIMEZONE) + if [ ! -e /usr/share/zoneinfo/$TIMEZONE ]; then + warn_user "\t$TIMEZONE is not a regular timezone or the corresponding\n\ \tfile at /usr/share/zoneinfo does not exist" - else - cp -af /usr/share/zoneinfo/$TIMEZONE usr/share/zoneinfo/$TIMEZONE - ln -sf ../usr/share/zoneinfo/$TIMEZONE etc/localtime - fi - fi - else - cpifnewer /etc/localtime etc - fi - - # do not chown -R root /var/spool/postfix/var - # this will break ownership for mysql on suse < 1120 - if [ "$(echo "$POSTFIX_WITH_MYSQL" | tr 'A-Z' 'a-z' )" != "no" ]; then - chown -R root "$PF_CHROOT"/{etc,@lib@,usr} - else - chown -R root "$PF_CHROOT"/{etc,@lib@,usr,var} - fi - fi # "$POSTFIX_CHROOT" - fi # "$POSTFIX_UPDATE_CHROOT_JAIL" + else + cp -af /usr/share/zoneinfo/$TIMEZONE usr/share/zoneinfo/$TIMEZONE + ln -sf ../usr/share/zoneinfo/$TIMEZONE etc/localtime + fi + fi + else + cpifnewer /etc/localtime etc + fi + + # do not chown -R root /var/spool/postfix/var + # this will break ownership for mysql on suse < 1120 + if [ "$(echo "$POSTFIX_WITH_MYSQL" | tr 'A-Z' 'a-z' )" != "no" ]; then + chown -R root "$PF_CHROOT"/{etc,@lib@,usr} + else + chown -R root "$PF_CHROOT"/{etc,@lib@,usr,var} + fi + fi # "$POSTFIX_CHROOT" } gen_main_cf(){ @@ -447,11 +452,11 @@ clnt_restrictions="$clnt_restrictions, reject_rbl_client $i" fi done - $PCONF -e "smtpd_client_restrictions = permit_mynetworks, $clnt_restrictions, reject_unknown_client_hostname" + $PCONF -e "smtpd_client_restrictions = permit_mynetworks, $clnt_restrictions, reject_unknown_client" else $PCONF -e \ - "smtpd_client_restrictions = permit_mynetworks, reject_unknown_reverse_client_hostname" + "smtpd_client_restrictions = permit_mynetworks, reject_unknown_client" fi $PCONF -e "smtpd_helo_required = yes" $PCONF -e "smtpd_helo_restrictions = permit_mynetworks, reject_invalid_hostname" @@ -466,7 +471,7 @@ s_clnt_restrictions=$(echo ${POSTFIX_SMTPD_CLIENT_RESTRICTIONS/\ \+/,/ }) else echo 1>&2 "No smtpd_client_restrictions defined ... setting to medium ..." - s_clnt_restrictions="reject_unauth_pipelining, reject_unknown_reverse_client_hostname" + s_clnt_restrictions="reject_unauth_pipelining, reject_unknown_client" fi if [ -n "$POSTFIX_RBL_HOSTS" ]; then rblhosts=$(echo ${POSTFIX_RBL_HOSTS//,/ }) @@ -486,7 +491,7 @@ helo_restrictions=$(echo ${POSTFIX_SMTPD_HELO_RESTRICTIONS/\ \+/,/ }) $PCONF -e "smtpd_helo_restrictions = $helo_restrictions" else - $PCONF -e "smtpd_helo_restrictions = reject_unauth_pipelining, reject_unknown_reverse_client_hostname" + $PCONF -e "smtpd_helo_restrictions = reject_unauth_pipelining, reject_unknown_client" fi if [ -n "$POSTFIX_SMTPD_SENDER_RESTRICTIONS" ]; then sender_restrictions=$(echo ${POSTFIX_SMTPD_SENDER_RESTRICTIONS/\ \+/,/ }) @@ -532,14 +537,14 @@ if test "$POSTFIX_SMTP_AUTH_SERVER" == "yes"; then if [ -f /etc/sasl2/smtpd.conf ]; then grep saslauthd /etc/sasl2/smtpd.conf >/dev/null && { - checkproc -p /run/sasl2/saslauthd.pid /usr/sbin/saslauthd || { + checkproc -p $RUN/sasl2/saslauthd.pid /usr/sbin/saslauthd || { warn_user 1>&2 "You are using saslauthd as pwcheck_method in /etc/sasl2/smtpd.conf,\n\ but saslauthd is not running." } } elif [ -f /usr/@lib@/sasl2/smtpd.conf ]; then grep saslauthd /usr/@lib@/sasl2/smtpd.conf >/dev/null && { - checkproc -p /run/sasl2/saslauthd.pid /usr/sbin/saslauthd || { + checkproc -p $RUN/sasl2/saslauthd.pid /usr/sbin/saslauthd || { warn_user 1>&2 "You are using saslauthd as pwcheck_method in /usr/@lib@/sasl2/smtpd.conf,\n\ but saslauthd is not running." } @@ -1264,7 +1269,7 @@ # Try to get a valid hostname... if [ -z "$POSTFIX_MYHOSTNAME" ]; then - test -s "$r/var/run/dhcp-hostname" && . "$r/var/run/dhcp-hostname" + test -s "$r/$RUN/dhcp-hostname" && . "$r/$RUN/dhcp-hostname" case $FQHOSTNAME in *.*) ;; *) unset FQHOSTNAME ;; esac test -z "$FQHOSTNAME" -a -s $r/etc/HOSTNAME && read -t 1 FQHOSTNAME < $r/etc/HOSTNAME # check whether hostname contains at least one dot... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
