diff --git a/postfix-SuSE-SASL_SOCKET_DIR.patch b/postfix-SuSE-SASL_SOCKET_DIR.patch new file mode 100644 index 0000000..2bcd535 --- /dev/null +++ b/postfix-SuSE-SASL_SOCKET_DIR.patch @@ -0,0 +1,53 @@ +diff -ruN postfix-SuSE-orig/SuSEconfig.postfix postfix-SuSE/SuSEconfig.postfix +--- postfix-SuSE-orig/SuSEconfig.postfix 2011-07-06 15:08:51.000000000 +0200 ++++ postfix-SuSE/SuSEconfig.postfix 2011-07-25 11:00:32.000000000 +0200 +@@ -91,6 +91,10 @@ + \tPlease check if postfix-mysql is installed and check for package mysql." + fi + fi ++ if [ "$(echo "$POSTFIX_SMTP_AUTH_SERVER" | tr 'A-Z' 'a-z' )" != "no" ]; then ++ SASL_SOCKET_DIR="/var/run/sasl2" ++ CHR_SASL_SOCKET_DIR="var/run/sasl2" ++ fi + if [ "$(echo "$POSTFIX_CHROOT" | tr 'A-Z' 'a-z' )" != "yes" -a \ + "$(echo "$POSTFIX_UPDATE_CHROOT_JAIL" | tr 'A-Z' 'a-z' )" != "no" ]; then + if [ -d etc ]; then +@@ -107,6 +111,12 @@ + fi + fi + ++ if [ -n "$CHR_SASL_SOCKET_DIR" ]; then ++ if grep "$PF_CHROOT"/$CHR_SASL_SOCKET_DIR /proc/mounts &> /dev/null; then ++ umount "$PF_CHROOT"/$CHR_SASL_SOCKET_DIR ++ fi ++ fi ++ + rm -rvf etc @lib@ usr var proc + elif [ "$(echo "$POSTFIX_UPDATE_CHROOT_JAIL" | tr 'A-Z' 'a-z' )" != "no" ]; then + echo "checking postfix chroot environment..." +@@ -138,6 +148,15 @@ + 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" ] +@@ -180,8 +199,7 @@ + cpifnewer "/etc/sasl2/*" etc/sasl2 + cpifnewer "/usr/@lib@/sasl2/*" usr/@lib@/sasl2 + cpifnewer "/usr/@lib@/libsasl2*" usr/@lib@ +- mkdir -p var/run/sasl2 +- ln -f /var/run/sasl2/mux var/run/sasl2/mux ++ + # CYRUS + mkdir -p var/lib/imap/socket/ + ln -f /var/lib/imap/socket/lmtp var/lib/imap/socket/lmtp diff --git a/postfix.changes b/postfix.changes index e0ba140..765d25a 100644 --- a/postfix.changes +++ b/postfix.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 25 09:08:14 UTC 2011 - chris@computersalat.de + +- when chrooted and using SASL + o mount -o bind SASL_SOCKET_DIR into postfix CHROOT + ------------------------------------------------------------------- Mon Jul 11 17:22:19 UTC 2011 - chris@computersalat.de diff --git a/postfix.spec b/postfix.spec index fb416cf..7fd9373 100644 --- a/postfix.spec +++ b/postfix.spec @@ -39,6 +39,7 @@ Patch10: %{name}-2.8.3-main.cf.patch Patch11: %{name}-2.8.3-master.cf.patch Patch12: %{name}-2.8.3-post-install.patch Patch20: %{name}-vda-v10-2.8.3.patch +Patch100: postfix-SuSE-SASL_SOCKET_DIR.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq PreReq: /usr/bin/getent @@ -148,6 +149,8 @@ PostgreSQL. %patch11 -p1 %patch12 -p1 %patch20 -p1 +# apply postfix-SUSE patches +%patch100 -p1 # --------------------------------------------------------------------------- %build