# problems with Qmail and LDAP

## Nestrus

Hello,

I want to install Qmail because I think it works good with LDAP, but i can't emerge it.

I know that qmail-ldap-1.03-r4 isn't stable but I didn't found a other stable release from Qmail wich would work with LDAP. I wrote in my package.keywords "mail-mta/qmail-ldap ~x86" but when I try to emerge qmail-ldap i got an error because of the -lshadow dependency. This isn't a great Problem because it is a known bug (https://bugs.gentoo.org/show_bug.cgi?id=62526) so i tried the patch from petre rodan, but when I then want to emerge qmail-ldap i get always an error:

```

...

chmod 755 makelib

./compile case_diffb.c

./compile: line 3: exec: -O: invalid option

exec: usage: exec [-cl] [-a name] file [redirection ...]

make: *** [case_diffb.o] Error 2

make: *** Waiting for unfinished jobs....

chmod 755 load

make: *** Waiting for unfinished jobs....

!!! ERROR: mail-mta/qmail-ldap-1.03-r5 failed.

!!! Function src_compile, Line 91, Exitcode 2

!!! (no error message)

```

(I hope I have copy&pasted enough.)

Because I'm not very familiar with Gentoo I don't know what to do know.

Can somebody please help me?

Thanks, Nestrus

PS: Please excuse my bad english.

----------

## Nestrus

Does anybody know a solution?

----------

## catalinux

in qmail-ldap r4, and r5 ebuild 

echo -n "${CC} ${CFLAGS}" >${S}/conf-cc

echo -n "${CC} ${LDFLAGS}" > ${S}/conf-ld

must be commented 

#echo -n "${CC} ${CFLAGS}" >${S}/conf-cc

#echo -n "${CC} ${LDFLAGS}" > ${S}/conf-ld

'cause  install process is a ' la djb 

but...if you dismiss numerous warning about tail and head improper use 

ebuild will be compiled just fine

----------

## Nestrus

Thank you very much catalinux, It works!

----------

## Nestrus

Hello everybody,

I installed qmail but it doesn't work with my LDAP-directory.

I think it is because I have the problem that SASL doesn't work, so when I try ldapsearch i get:

```

SASL/DIGEST-MD5 authentication started

Please enter your password:

ldap_sasl_interactive_bind_s: Internal (implementation specific) error (80)

        additional info: SASL(-13): user not found: no secret in database

```

But it works with simple authentification:

```

ldapsearch -x

# extended LDIF

#

# LDAPv3

# base <> with scope sub

# filter: (objectclass=*)

# requesting: ALL

#

...

```

When i try to send a mail to myself with qmail (with qmail-inject) i get in my /var/log/qmail/qmail-send/current:

```

@400000004240e5be15a494ac starting delivery 521: msg 1212592 to local root@meinweb.at

@400000004240e5be15a4a834 status: local 1/10 remote 0/20

@400000004240e5be1632f9cc delivery 521: deferral: Unable_to_login_into_LDAP_server,_bad_credentials._(#4.4.3)/

@400000004240e5be1633113c status: local 0/10 remote 0/20

```

But in var/log/messages it lookes like the bind was successfull:

```

Mar 23 03:42:44 meinweb slapd[279]: conn=349 fd=12 ACCEPT from IP=127.0.0.1:55710 (IP=0.0.0.0:389)

Mar 23 03:42:44 meinweb slapd[21167]: conn=349 op=0 BIND dn="cn=Manager,dc=meineb,dc=at" method=128

Mar 23 03:42:44 meinweb slapd[21167]: conn=349 op=0 RESULT tag=97 err=49 text=

Mar 23 03:42:44 meinweb slapd[21167]: conn=349 op=1 UNBIND

Mar 23 03:42:44 meinweb slapd[21167]: conn=349 fd=12 closed

```

I'm very confused now..

I think that I have to tell qmail that it should youse simple authentication, but how I can make this?

Or can anybody help me to get SALS work?

TIA, lg Nestrus

----------

