Found http://www.mailinglistarchive.com/dovecot at dovecot.org/msg03185.html,
but I don't think this is my problem because using ldapsearch I can search
using dovecot.
# /usr/local/openldap/bin/ldapsearch -x -h localhost -b
DC=XXXXX,DC=ce,DC=gov,DC=br -D cn=dovecot,dc=XXXXX,dc=ce,dc=gov,dc=br -w
XXXXX -LLL -z 0 -E pr=100/noprompt
dn: mail=rodrigo at XXXXX.ce.gov.br,jvd=XXXXX.ce.gov.br
,o=mail,dc=XXXXX,dc=ce,dc=gov,dc=br
objectClass: top
objectClass: JammMailAccount
mail: rodrigo at XXXXX.ce.gov.br
mailbox: XXXXX.ce.gov.br/rodrigo/
homeDirectory: /home/vmail/domains
userPassword:: e0NSWVBUfVlaSlpOa0JrMzgxZ2ccn: M. Rodrigo Monteiro
accountActive: TRUE
lastChange: 1216410148
delete: FALSE
My confs are:
0# /usr/local/dovecot/sbin/dovecot -n
# 1.1.1: /usr/local/dovecot/etc/dovecot.conf
log_path: /var/log/dovecot.log
info_log_path: /var/log/dovecot-info.log
ssl_disable: yes
disable_plaintext_auth: no
login_dir: /usr/local/dovecot/var/run/dovecot/login
login_executable: /usr/local/dovecot/libexec/dovecot/imap-login
valid_chroot_dirs: /home/vmail/domains
first_valid_uid: 200
last_valid_uid: 200
first_valid_gid: 200
last_valid_gid: 200
mail_location: maildir:/home/vmail/domains/%d/%n
auth default:
user: dovecot-auth
verbose: yes
debug: yes
debug_passwords: yes
passdb:
driver: ldap
args: /usr/local/dovecot/etc/dovecot-ldap.conf
userdb:
driver: ldap
args: /usr/local/dovecot/etc/dovecot-ldap.conf
# grep -v '^ *\(#.*\)\?$' /usr/local/dovecot/etc/dovecot-ldap.conf
hosts = localhost
dn = cn=dovecot,dc=XXXXX,dc=ce,dc=gov,dc=br
dnpass = XXXXXXXXXXX
ldap_version = 3
base = o=mail, dc=XXXXX, dc=ce, dc=gov, dc=br
deref = never
scope = subtree
user_attrs = mail,homeDirectory,,,,
user_filter
(&(objectClass=JammMailAccount)(mail=%u)(accountActive=TRUE)(delete=FALSE))
pass_attrs = mail,userPassword
pass_filter
(&(objectClass=JammMailAccount)(mail=%u)(accountActive=TRUE)(delete=FALSE))
default_pass_scheme = CRYPT
# cat dovecot-info.log
dovecot: Jul 21 10:04:51 Info: auth(default): client in: AUTH 1
PLAIN service=imap lip=XXX.XXX.XXX.43 rip=XXX.XXX.XXX.55
lport=143 rport=2320
dovecot: Jul 21 10:04:51 Info: auth(default): client out: CONT 1
dovecot: Jul 21 10:04:51 Info: auth(default): client in: CONT 1
AHJvZHJpZ29Ac2VkdWMuY2UuZ292LmJyAHRlc3Rl
dovecot: Jul 21 10:04:51 Info: auth(default):
ldap(rodrigo at XXXXX.ce.gov.br,XXX.XXX.XXX.55):
pass search: base=o=mail, dc=XXXXX, dc=ce, dc=gov, dc=br scope=subtree
filter=(&(objectClass=JammMailAccount)(mail=rodrigo at
XXXXX.ce.gov.br)(accountActive=TRUE)(delete=FALSE))
fields=mail,userPassword
dovecot: Jul 21 10:04:51 Info: auth(default):
ldap(rodrigo at XXXXX.ce.gov.br,XXX.XXX.XXX.55):
result: mail(mail)=rodrigo at
XXXXX.ce.gov.bruserPassword(userPassword)={CRYPT}YZJZNkBk381gg
dovecot: Jul 21 10:04:53 Info: auth(default): client out: FAIL 1
user=rodrigo at XXXXX.ce.gov.br temp
mail=rodrigo at XXXXX.ce.gov.bruserPassword={CRYPT}YZJZNkBk381gg
# cat dovecot.log
dovecot: Jul 21 11:28:09 Error: auth(default):
ldap(rodrigo at XXXXX.ce.gov.br,XXX.XXX.XXX.55):
No password in reply
In phpLDAPadmin, the userPassword attribute is {CRYPT}YZJZNkBk381gg, the
same as in dovecot-info.log
--
M. Rodrigo Monteiro
falecom at rodrigomonteiro.net
"Free as in Freedom, not free as in free beer"
Linux User # 403730