[Date Prev][Date Next] [Chronological] [Thread] [Top]

Sendmail + LDAP



Hi,

I experince some problems with setting up Sendmail with the LDAP database for virtual mail accounts.

I believe, that the reason of my problem is in configuring dovecot-deliver, but nobody answers me in the dovecot-mailing list, so i've decided to post
a message here

What i have:
 - FreeBSD 8.2-RELEASEï
 - sendmail (Version 8.14.4 with LDAP support installed from ports)ï
 - Dovecot LDA + dovecot (as pop3/imap) - 1.2.16ï
 - openldap - 2.4.23

1. Following http://wiki.dovecot.org/LDA/Sendmail i've set up deliver as LDA. Everything worked fine.
2. Following http://wiki.dovecot.org/HowTo/DovecotOpenLdap i've set up Dovecot to work with tha ldap. Now i can authorize through the client or web interface and get to my maildir.ï

3. Now, i want my sendmail to accept mail for the account in LDAP database.

sendmail.mc:

++++++++++++++++++++++
FEATURE(`local_procmail', `/usr/local/libexec/dovecot/deliver',`/usr/local/libexec/dovecot/deliver -d $u')
MODIFY_MAILER_FLAGS(`LOCAL', `-f')
......................................
define(`confLDAP_DEFAULT_SPEC', `-h "localhost" -b "dc=mydomain,dc=ru" -d "cn=dovecot,ou=accounts,dc=mydomain,dc=ru" -MLDAP_AUTH_SIMPLE -P /etc/mail/ldap_pass')dnl
LDAPROUTE_DOMAIN(`mydomain.ru')dnl
FEATURE(`ldap_routing', `null -T<TMPF>', `ldap -1 -T<TMPF> -v mail -k (&(objectclass=posixaccount)(mail=%0))', `passthru')dnl
......................................
MAILER(procmail)
++++++++++++++++++++++


After re-making the sendmail:

++++++++++++++++++++++
[root@test2 /etc/mail]# sendmail -bv -d60.1 test_user@mydomain.ru
map_lookup(dequote, test) => NOT FOUND (0)
map_lookup(host, mydomain.ru) => mydomain.ru. (0)
map_lookup(dequote, test_user) => NOT FOUND (0)
map_lookup(ldapmra, test_user@mydomain.ru) => test_user@mydomain.ru (0)
map_lookup(ldapmh, test_user@mydomain.ru) => NOT FOUND (68)
map_lookup(host, mydomain.ru) => mydomain.ru. (0)
map_lookup(dequote, test_user) => NOT FOUND (0)
map_lookup(virtuser, test_user@mydomain.ru) => NOT FOUND (0)
map_lookup(virtuser, @mydomain.ru) => NOT FOUND (0)
test_user@mydomain.ru... User unknown
++++++++++++++++++++++

It's the problem of the local delivery, i believe. Why? Because after sendmail getting an email it passes it to the LDA, which must check the LDAP (not the passwd!) database for the user, to which this email is send to.

Are there some possibilities to solve this problem?

Or, maybe there might be a problem in cofiguring the OpenLDAP?

I appreciate any help.ï..

-----------------------
Best regards, Vasily Yakovlev