Hi finally I did it

The big trick was don't left space on end of line on
LDAP_MAIL       mail

if you put one space on the end the ldapsearch will fail (mail =bla bla must be mail=bla bla)

# delete olders couriers
1001  chkconfig --list | grep courier
1002  service courier-imap stop
1004  rpm -e courier-imap courier-imap-ldap

# compile an install courier-authlib-0.56
1008  tar jxvf courier-authlib-0.56.tar.bz2
1009  cd courier-authlib-0.56
1010 ./configure --prefix=/usr/local --exec-prefix=/usr/local --without-authvchkpw --with-authldap --without-authmysql --disable-root-check --with-ssl --with-authchangepwdir=/usr/local/libexec/authlib --with-redhat
1011  make && make check && make install-strip && make install-configure
1012  vi /etc/ld.so.conf.d/

add /usr/local/lib/courier-authlib

1013  ldconfig
1014  vi /usr/local/etc/authlib/authdaemonrc

modify to :
authmodulelist="authldap"
DEBUG_LOGIN=1

1015  vi /usr/local/etc/authlib/authldaprc

add:
LDAP_SERVER             127.0.0.1
LDAP_PORT               389

LDAP_PROTOCOL_VERSION   3

LDAP_BASEDN             dc=darkstar,dc=portugal

LDAP_BINDDN             cn=manager,dc=darkstar,dc=portugal
LDAP_BINDPW             (your passwd)

LDAP_TIMEOUT            5

LDAP_MAIL               mail

LDAP_DOMAIN             darkstar.portugal

LDAP_GLOB_UID           vmail
LDAP_GLOB_GID           vmail

LDAP_HOMEDIR            mailMessageStore

LDAP_MAILDIR            ./Maildir

LDAP_DEFAULTDELIVERY    defaultDelivery

LDAP_FULLNAME           cn

LDAP_CLEARPW            clearPassword
LDAP_CRYPTPW            userPassword

LDAP_UID                uidNumber
LDAP_GID                gidNumber

LDAP_DEREF              never
LDAP_TLS                0

1025 cp /downloads/qmailrocks/courier-authlib-0.56/courier-authlib.sysvinit /etc/init.d/courier-authlib
1026  chkconfig --add courier-authlib
1027  chkconfig --list courier-authlib
1051  chmod +x /etc/init.d/courier-authlib
1053  service courier-authlib start

1022  tar jxvf courier-imap-4.0.3.tar.bz2
1023  chown -R sergio:users courier-imap-4.0.3
as user sergio:users
./configure --prefix=/usr/local --exec-prefix=/usr/local --with-authvchkpw --without-authldap --without-authmysql --disable-root-check --with-ssl --with-authchangepwdir=/usr/local/libexec/authlib --with-redhat && make && make check

1025  cd courier-imap-4.0.3
1026  make install-strip && make install-configure
1185  vi /usr/local/etc/imapd.cnf
1188  /usr/local/sbin/mkimapdcert

1226  cp courier-imap.sysvinit /etc/init.d/courier-imap
1228  chmod +x /etc/init.d/courier-imap
1230  chkconfig --add courier-imap
1231  chkconfig --list courier-imap
1232  service courier-imap stop

vi /usr/local/etc/imapd

Make sure that the following configuration exists: IMAPDSTART=YES

vi /usr/local/etc/imapd-ssl

Make sure that the following configuration exists: IMAPDSSLSTART=YES

Make sure that the following configuration exists:
TLS_CERTFILE=/usr/local/share/imapd.pem

1233  service courier-imap start
1202  tail -f /var/log/maillog

Reply via email to