From 305c62b36c741dece32779ed620d008d3071a3dabcbef683e7cc3662ffff998b Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Mon, 10 Jan 2011 09:43:15 +0000 Subject: [PATCH 1/2] Updating link to change in openSUSE:Factory/postfix revision 56.0 OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=70a98a1e816cdce513ff2ef0154f168c --- postfix.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postfix.spec b/postfix.spec index 6ed09f0..16ca06b 100644 --- a/postfix.spec +++ b/postfix.spec @@ -1,7 +1,7 @@ # # spec file for package postfix (Version 2.7.2) # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,7 +22,7 @@ Name: postfix Summary: A fast, secure, and flexible mailer Version: 2.7.2 -Release: 6 +Release: 1 License: IBM Public License .. Group: Productivity/Networking/Email/Servers Url: http://www.postfix.org/ From 194cf651d2a02ed95d2b59e333c5b5d5a1a37da8cfe0e9993798e27654513ed5 Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Mon, 31 Jan 2011 08:37:02 +0000 Subject: [PATCH 2/2] Accepting request 58474 from home:computersalat:devel:mail no complain, hence self accept OBS-URL: https://build.opensuse.org/request/show/58474 OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=58 --- postfix-SuSE-ldap.patch | 69 +++++++++++++++++++++++++++++++++++++++++ postfix.changes | 9 ++++++ postfix.spec | 4 +++ 3 files changed, 82 insertions(+) create mode 100644 postfix-SuSE-ldap.patch diff --git a/postfix-SuSE-ldap.patch b/postfix-SuSE-ldap.patch new file mode 100644 index 0000000..c3c21dd --- /dev/null +++ b/postfix-SuSE-ldap.patch @@ -0,0 +1,69 @@ +diff -ruN postfix-SuSE-orig/ldap_aliases.cf postfix-SuSE/ldap_aliases.cf +--- postfix-SuSE-orig/ldap_aliases.cf 1970-01-01 01:00:00.000000000 +0100 ++++ postfix-SuSE/ldap_aliases.cf 2011-01-17 10:43:12.000000000 +0100 +@@ -0,0 +1,4 @@ ++server_host = 127.0.0.1 ++search_base = dc=mail,dc=net ++query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))(objectClass=posixAccount)) ++result_attribute = uid +diff -ruN postfix-SuSE-orig/SuSEconfig.postfix postfix-SuSE/SuSEconfig.postfix +--- postfix-SuSE-orig/SuSEconfig.postfix 2010-11-25 16:15:29.000000000 +0100 ++++ postfix-SuSE/SuSEconfig.postfix 2011-01-17 11:39:32.000000000 +0100 +@@ -231,6 +231,8 @@ + TMPDIR=$(mktemp -d /tmp/SuSEconfig.postfix.XXXXXX) || exit 1 + PCONF="/usr/sbin/postconf -c $TMPDIR" + ++ # needed when for WITH_LDAP ++ export POSTFIX_WITH_LDAP + # needed when for WITH_MYSQL + export POSTFIX_WITH_MYSQL + MCF_DIR=$TMPDIR +@@ -623,6 +625,11 @@ + my $mncf = "$ENV{MCF_DIR}/main.cf"; + my $line; + ++my $with_ldap = ++ defined $ENV{POSTFIX_WITH_LDAP} ? $ENV{POSTFIX_WITH_LDAP} : "no"; ++ ++$with_ldap = lc($with_ldap); ++ + my $with_mysql = + defined $ENV{POSTFIX_WITH_MYSQL} ? $ENV{POSTFIX_WITH_MYSQL} : "no"; + +@@ -634,10 +641,14 @@ + chomp; + + if( /\#?(virtual_alias_maps\s=\s).*/ ) { +- if ($with_mysql ne "yes") { +- $line = $1."hash:/etc/postfix/virtual"; +- } else { ++ if ($with_mysql ne "yes" && $with_ldap ne "yes") { ++ $line = $1."hash:/etc/postfix/virtual"; ++ } elsif ($with_ldap eq "yes" && $with_mysql ne "yes") { ++ $line = $1."hash:/etc/postfix/virtual ldap:/etc/postfix/ldap_aliases.cf"; ++ } elsif ($with_mysql eq "yes" && $with_ldap ne "yes") { + $line = $1."hash:/etc/postfix/virtual mysql:/etc/postfix/mysql_virtual_alias_maps.cf"; ++ } elsif ($with_mysql eq "yes" && $with_ldap eq "yes") { ++ $line = $1."hash:/etc/postfix/virtual ldap:/etc/postfix/ldap_aliases.cf mysql:/etc/postfix/mysql_virtual_alias_maps.cf"; + } + } elsif( /\#?(virtual_uid_maps\s=.*)/ ) { + if ($with_mysql ne "yes") { +diff -ruN postfix-SuSE-orig/sysconfig.postfix postfix-SuSE/sysconfig.postfix +--- postfix-SuSE-orig/sysconfig.postfix 2010-07-06 16:57:01.000000000 +0200 ++++ postfix-SuSE/sysconfig.postfix 2011-01-17 10:40:19.000000000 +0100 +@@ -125,6 +125,15 @@ + ## Default: no + ## Config: postfix + # ++# Set this to yes, if SuSEconfig should activate ldap stuff in main.cf ++# This extends virtual_alias_maps with "ldap:/etc/postfix/ldap_aliases.cf" ++# ++POSTFIX_WITH_LDAP="no" ++ ++## Type: yesno ++## Default: no ++## Config: postfix ++# + # Set this to yes, if SuSEconfig should activate mysql stuff in main.cf + # and having 'mysql.sock' inside chroot jail + # Note: When POSTFIX_CHROOT="yes" then 'mysql.sock' will be available diff --git a/postfix.changes b/postfix.changes index 5597921..840e359 100644 --- a/postfix.changes +++ b/postfix.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Jan 17 09:56:32 UTC 2011 - chris@computersalat.de + +- add some min LDAP support for virtual LDAP-users + o sysconfig "WITH_LDAP" + o add ldap_aliases.cf + o SuSEconfig.postfix + virtual_alias_maps = ... ldap:/etc/postfix/ldap_aliases.cf + ------------------------------------------------------------------- Tue Jan 4 12:14:06 UTC 2011 - chris@computersalat.de diff --git a/postfix.spec b/postfix.spec index 16ca06b..36c72a4 100644 --- a/postfix.spec +++ b/postfix.spec @@ -38,6 +38,7 @@ Patch2: pointer_to_literals.patch Patch3: ipv6_disabled.patch Patch10: %{name}-2.7.1-main.cf.patch Patch11: %{name}-vda-2.7.1.patch +Patch12: %{name}-SuSE-ldap.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq PreReq: /usr/bin/getent @@ -170,6 +171,7 @@ Authors: %patch3 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p0 # --------------------------------------------------------------------------- %build @@ -263,6 +265,7 @@ sed -e 's;@lib@;%{_lib};g' \ chmod 755 $RPM_BUILD_ROOT/sbin/conf.d/SuSEconfig.%{name} install -m 644 %{name}-SuSE/master.cf $RPM_BUILD_ROOT/etc/%{name}/master.cf install -m 644 %{name}-SuSE/dynamicmaps.cf $RPM_BUILD_ROOT/etc/%{name}/dynamicmaps.cf +install -m 644 %{name}-SuSE/ldap_aliases.cf $RPM_BUILD_ROOT/etc/%{name}/ldap_aliases.cf install -m 644 %{name}-SuSE/helo_access $RPM_BUILD_ROOT/etc/postfix/helo_access install -m 644 %{name}-SuSE/permissions $RPM_BUILD_ROOT/etc/permissions.d/%{name} install -m 644 %{name}-SuSE/sender_canonical $RPM_BUILD_ROOT/etc/%{name}/sender_canonical @@ -503,6 +506,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) /etc/%{name}/header_checks %config(noreplace) /etc/%{name}/bounce.cf.default %config(noreplace) /etc/%{name}/dynamicmaps.cf +%config(noreplace) /etc/%{name}/ldap_aliases.cf %config /etc/sysconfig/SuSEfirewall2.d/services/%{name} %dir /etc/sasl2/ %config(noreplace) /etc/sasl2/smtpd.conf