0

I set up a mail server AD + Postfix + Dovecot + Kerberos

This works fine for only one domain In the attribute mail=test@test.com, in otherMailbox=vasya@otherdoamin.com,petya@another.net

Config files:

Postfix ldap-users.cf

server_host = server
search_base = dc=cn,dc=energy
version = 3
bind = yes
bind_dn = ldapmail@cn.energy
bind_pw = passwd

query_filter = (&(objectCategory=person)(|(mail=%s)(otherMailbox=%s))(!(userAccountControl=514)))
result_attribute = mail otherMailbox
result_format = %d/%u

dovecot-ldap.conf

hosts = server:3268
debug_level = 2
dn = ldapmail
dnpass = passwd
tls = no
auth_bind = yes
auth_bind_userdn = cn.energy\%u
ldap_version = 3
base = dc=cn, dc=energy
deref = searching
scope = subtree
user_attrs = mail=user,uid=vmail, gid=vmail
user_filter = (&(objectclass=person)(|(sAMAccountName=%n)(otherMailbox=%n))(!(userAccountControl=514)))
default_pass_scheme = CRYPT

postconf:

attribute mail

postmap -q ross@test.com ldap:/etc/postfix/ldap-users.cf
another.net/petya,otherdoamin.com/vasya,test@test.com/ross

attribute otherMailbox

postmap -q ross@otherdoamin.com ldap:/etc/postfix/ldap-users.cf
another.net/petya,otherdoamin.com/vasya,test@test.com/ross

The filter searches and finds the correct. Just does not work result_format ???

example:

another.net/petya,otherdoamin.com/vasya,test@test.com/ross

this name one directory ! hmmm dovecot dont find it

Many thanks for your help.

  • Can you please specify your question? What's your problem exactly? – sebokopter Jun 3 '11 at 1:10
1

Is your problem that your postfix ldap query works but your dovecot ldap query doesn't?

Then you probably take a closer look at your mapping of the user_attrs in the dovecot-ldap.conf. You specifiy in the user_attrs ldap-attribute = dovecot-attribute. There might be something wrong here because dovecot doesn't know an attribute named vmail 1,2. See:

http://wiki.dovecot.org/PasswordDatabase#lookupdbs and http://wiki.dovecot.org/PasswordDatabase/ExtraFields

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.