[Dovecot] ldap and user_filter

Chad Leigh -- Shire.Net LLC chad at shire.net
Wed Apr 26 20:38:18 EEST 2006


I have my own custom schema for email that I have been using for  
years with courier_imap and exim.  I am experimenting with dovecot  
and trying to set up my conf so that it logs in using the ldap database.

In the dovecot-ldap.conf there is a section

# Filter for user lookup. Some variables can be used (see
# http://wiki.dovecot.org/Variables for full list):
#   %u - username
#   %n - user part in user at domain, same as %u if there's no domain
#   %d - domain part in user at domain, empty if user there's no domain
#user_filter = (&(objectClass=posixAccount)(uid=%u))

In order to match my scheme I changed it to

user_filter = (&(objectClass=shireNetEmailaccount) 
(shireNetEmailAddress=%u))

This should match my courier setup of

##NAME: LDAP_MAIL:0
#
# Here's the field on which we query

#LDAP_MAIL              mail


LDAP_MAIL               shireNetEmailAddress

---

Anyway, it appears from the logs that my user_filter is being ignored  
as I get the following in the log

dovecot: Apr 26 11:24:35 Info: auth(default): ldap(chad at rkba.com, 
67.171.127.191): base=dc=shire, dc=net scope=subtree filter=(& 
(objectClass=posixAccount)(uid=chad at rkba.com))   
fields=shireNetUserPassword

which shows the original default user_filter

What do I need to do to have it use the one I give in the dovecat- 
ldap.conf and not the default?

The dovecot-ldap.conf is being used as it is going against my ldap  
server

thanks
Chad

---
Chad Leigh -- Shire.Net LLC
Your Web App and Email hosting provider
chad at shire.net





More information about the dovecot mailing list