Luca Olivetti wrote:
> En/na Luca Berra ha escrit:
...
> both sasl 2
...
> and sasl 1 (pulled in by ldap).
>
> No wonder it segfaults.
well' actually i fixed smtp auth not working (sorry i was an idiot the
problem was right in front of me), but that leaves a non-working ldap.
> Until ldap uses sasl 2 it's useless to compile postfix with sasl 2.
I beg to differ:
Until ldap uses sasl 2 it's useless to compile postfix with ldap: ldap
should be fixed, not postfix crippled.
since we might go on with this different view i propose to give lusers a
choice: (see attached diff)
while ldap users are able to authenticate with pam_ldap, non ldap_users
would be very grateful of being allowed to use saslauthd.
Another possible interim solution could be building proxymap with ldap
support and smtpd without, and using proxymap to access ldap tables.
Toughts?
rgrds,
L.
--
Luca Berra -- [EMAIL PROTECTED]
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
--- postfix.spec.sasl2.orig 2003-06-13 15:46:11.000000000 +0200
+++ postfix.spec 2003-06-15 14:40:30.000000000 +0200
@@ -2,7 +2,7 @@
# If set to 0 if official version, 1 if snapshot
%define experimental 0
%define version 2.0.12
-%define release 2mdk
+%define release 3mdk
%define releasedate 20020508
%define openssl_ver 0.9.7b
@@ -18,24 +18,29 @@
%define alternatives 1
%define alternatives_install_cmd update-alternatives --install %{_sbindir}/sendmail
mta %{_sbindir}/sendmail.postfix 30 --slave %{_libdir}/sendmail mta-in_libdir
%{_sbindir}/sendmail.postfix --slave %{_bindir}/mailq mta-mailq
%{_bindir}/mailq.postfix --slave %{_bindir}/newaliases mta-newaliases
%{_bindir}/newaliases.postfix --slave %{_bindir}/rmail mta-rmail
%{_bindir}/rmail.postfix --slave %{_mandir}/man1/mailq.1.bz2 mta-mailqman
%{_mandir}/man1/mailq.postfix.1.bz2 --slave %{_mandir}/man1/newaliases.1.bz2
mta-newaliasesman %{_mandir}/man1/newaliases.postfix.1.bz2 --slave
%{_mandir}/man5/aliases.5.bz2 mta-aliasesman %{_mandir}/man5/aliases.postfix.5.bz2
--slave %{_sysconfdir}/aliases mta-etc_aliases %{_sysconfdir}/postfix/aliases
-%define with_LDAP 1
+%define with_LDAP 0
%define with_MYSQL 0
%define with_PCRE 1
-%define with_SASL 1
+%define with_SASL 0
+%define with_SASL2 1
%define with_TLS 1
%define with_SMTPD_MULTILINE_GREETING 0
-%{?_without_ldap: %{expand: %%define with_LDAP 0}}
-%{?_without_mysql: %{expand: %%define with_MYSQL 0}}
-%{?_without_pcre: %{expand: %%define with_PCRE 0}}
-%{?_without_sasl: %{expand: %%define with_SASL 0}}
-%{?_without_tls: %{expand: %%define with_TLS 0}}
-
-%{?_with_ldap: %{expand: %%define with_LDAP 1}}
-%{?_with_mysql: %{expand: %%define with_MYSQL 1}}
-%{?_with_pcre: %{expand: %%define with_PCRE 1}}
-%{?_with_sasl: %{expand: %%define with_SASL 1}}
-%{?_with_tls: %{expand: %%define with_TLS 1}}
+%{?_without_ldap: %{expand: %%global with_LDAP 0}}
+%{?_without_mysql: %{expand: %%global with_MYSQL 0}}
+%{?_without_pcre: %{expand: %%global with_PCRE 0}}
+%{?_without_sasl: %{expand: %%global with_SASL 0}}
+%{?_without_sasl2: %{expand: %%global with_SASL2 0}}
+%{?_without_tls: %{expand: %%global with_TLS 0}}
+
+%{?_with_ldap: %{expand: %%global with_LDAP 1}}
+%{?_with_mysql: %{expand: %%global with_MYSQL 1}}
+%{?_with_pcre: %{expand: %%global with_PCRE 1}}
+%{?_with_sasl: %{expand: %%global with_SASL 1}}
+%{?_with_sasl: %{expand: %%global with_SASL2 0}}
+%{?_with_sasl2: %{expand: %%global with_SASL2 1}}
+%{?_with_sasl2: %{expand: %%global with_SASL 0}}
+%{?_with_tls: %{expand: %%global with_TLS 1}}
# Postfix requires one exlusive uid/gid and a 2nd exclusive gid for its own use.
%define postfix_uid 35
@@ -103,9 +108,14 @@
BuildRequires: MySQL, MySQL-client, MySQL-devel
%endif
-%if %{with_SASL}
+%if %{with_SASL2}
Requires: cyrus-sasl
BuildRequires: cyrus-sasl, libsasl2-devel
+%else
+%if %{with_SASL}
+Requires: cyrus-sasl
+BuildRequires: cyrus-sasl, libsasl7-devel
+%endif
%endif
%if %{with_TLS}
@@ -131,6 +141,10 @@
If you need MySQL too, rebuild the srpm --with mysql.
%prep
+%if %{with_LDAP} && %{with_SASL2}
+%{error: LDAP and SASL2 are incompatible}
+exit 1
+%endif
%setup -q -a 9
# Apply the TLS patch, must be at first, because the changes of master.cf
%if %{with_TLS}
@@ -185,9 +199,14 @@
CCARGS="${CCARGS} -DHAS_MYSQL -I/usr/include/mysql"
AUXLIBS="${AUXLIBS} -L%{_libdir}/mysql -lmysqlclient -lm"
%endif
-%if %{with_SASL}
+%if %{with_SASL2}
CCARGS="${CCARGS} -DUSE_SASL_AUTH -I/usr/include/sasl"
AUXLIBS="${AUXLIBS} -lsasl2"
+%else
+%if %{with_SASL}
+ CCARGS="${CCARGS} -DUSE_SASL_AUTH -I/usr/include/sasl"
+ AUXLIBS="${AUXLIBS} -lsasl"
+%endif
%endif
%if %{with_TLS}
LIBS=