Bug 14680

Summary: Specfile (make command) patch to give postfix ldap support
Product: [Retired] Red Hat Powertools Reporter: Karl O. Pinc <karl>
Component: postfixAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 6.2Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-07-26 20:13:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karl O. Pinc 2000-07-26 20:13:05 UTC
Now that redhat is shipping with openldap, we really, really want ldap
support in our MTA.  (We're moving all our e-mail authentication and
aliases into ldap, "closing" the server to logins, and distributing the
authentication to multiple boxes -- web server, radius remote access, imap,
etc.)

Also, please add /usr/libexec/postfix/nqmgr to the %files section.  (That's
not in this patch.)

Here's a patch to the RawHide postfix-20000531-3 rpm spec file that builds
in ldap support.

(I'm not _certain_ that it works chrooted, as you have configured.  We're
not chrooting so the smtp server can reject invalid addresses, to give our
smtp users instant feedback and keep from sending them bounced mail.)

(If you don't want to build ldap support how about building a sub-package
that has it?)

--- postfix.spec-3	Thu Jul  6 12:26:37 2000
+++ /usr/src/redhat/SPECS/postfix.spec	Wed Jul 26 14:26:21 2000
@@ -18,8 +18,9 @@
 Provides: MTA smtpd smtpdaemon
 Conflicts: sendmail
 Version: 20000531
-Release: 3
+Release: 4
 BuildRoot: /var/tmp/%{name}-%{version}-root
+BuildRequires: openldap-devel
 
 %description
 Postfix, see http://www.postfix.org, aims to be an alternative to the
@@ -68,7 +69,7 @@
 
 %build
 umask 022
-make DEBUG="" OPT="$RPM_OPT_FLAGS"
+make DEBUG="" OPT="$RPM_OPT_FLAGS -DHAS_LDAP" AUXLIBS="-lldap -llber"
 
 %install
 umask 022
@@ -144,6 +145,17 @@
     fi
 fi
 
+if [ -e /usr/lib/libldap.so.1 ]; then
+   cmp -s /usr/lib/libldap.so.1 %{queue_directory}/usr/lib/libldap.so.1
2>/dev/null || \
+        install -c /usr/lib/libldap.so.1 %{queue_directory}/usr/lib
+fi
+
+if [ -e /usr/lib/liblber.so.1 ]; then
+   cmp -s /usr/lib/liblber.so.1 %{queue_directory}/usr/lib/liblber.so.1
2>/dev/null || \
+        install -c /usr/lib/liblber.so.1 %{queue_directory}/usr/lib
+fi
+        
+
 %{command_directory}/postfix check
 
 %preun
@@ -236,6 +248,9 @@
 %{_mandir}/*/*
 
 %changelog
+* Wed Jul 19 2000 Karl O. Pinc <kop>
+- compiled with openldap support (now requires ldap dynamic libs)
+
 * Thu Jul 06 2000 Tim Powers <timp>
 - fixed PreReq to PreReq /etc/init.d

Comment 1 Bernhard Rosenkraenzer 2000-08-03 10:03:04 UTC
We don't want the additional dependency because most users don't use LDAP for
mail ATM, and for 7.0, we're well beyond the point where new packages can be
added.
So what I've done for now is adding a %define LDAP option to the source RPM and
%if %{LDAP}'ing the changes, so adding the option with a rebuild comes down to
editing one line in the spec file.