[Dovecot] "%d" does not expand to domain on wildcard search
Hi, I found that doing a wildcard search with doveadm doesn't expand the %d global variable when doing a wildcard search like:
doveadm search *@domain ALL LARGER 10000k doveadm(root): Error: User listing returned failure doveadm: Error: Failed to iterate through some users
In /var/log/dovecot.log:
Nov 22 20:48:07 auth-worker: Debug: ldap: iterate: base=vd=%d,dc=domain scope=subtree filter=(&(objectClass=VirtualMailAccount)(accountActive=TRUE)) fields=mail Nov 22 20:48:07 auth-worker: Error: ldap(?): ldap_search((&(objectClass=VirtualMailAccount)(accountActive=TRUE))) failed: No such object
Is this a bug?
Configs: #file /usr/local/etc/dovecot/dovecot-ldap.conf.ext: hosts = x.x.x.x dn = cn=dovecot,dc=domain dnpass = mypass auth_bind = yes auth_bind_userdn = mail=%u,vd=%d,dc=domain ldap_version = 3 base = vd=%d,dc=domain deref = never scope = subtree user_attrs = mailbox=mail=maildir:/home/vmail/domains/%$,quota=quota_rule=*:storage=%$,vdHome=home=%$/%d/%1u/%1.1u/%n,=uid=504,=gid=12 user_filter = (&(&(objectClass=VirtualMailAccount)(mail=%u))(accountActive=TRUE)) pass_attrs = userPassword=password,mail=user pass_filter = (&(&(objectClass=VirtualMailAccount)(mail=%u))(accountActive=TRUE)) iterate_attrs = mail=user iterate_filter = (&(objectClass=VirtualMailAccount)(accountActive=TRUE)) default_pass_scheme = CRYPT
# 2.0.16: /usr/local/etc/dovecot/dovecot.conf # OS: Linux 2.6.18-194.3.1.el5 x86_64 CentOS release 5.5 (Final) ext3 auth_mechanisms = plain login dict { expire = pgsql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext } hostname = localhost lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes log_path = /var/log/dovecot.log mail_gid = 12 mail_location = maildir:/home/vmail/domains/%d/%1u/%1.1u/%n mail_plugins = quota autocreate expire mail_privileged_group = mail mail_uid = 504 managesieve_notify_capability = mailto managesieve_sieve_capability = comparator-i;octet comparator-i;ascii-casemap fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date spamtest spamtestplus virustest passdb { args = /usr/local/etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { autocreate = Enviados autocreate2 = Papelera autocreate3 = Borrador autocreate4 = Spam autosubscribe = Enviados autosubscribe2 = Papelera autosubscribe3 = Borrador autosubscribe4 = Spam expire = Papelera expire2 = Papelera/* expire3 = Spam expire4 = Spam/* expire_dict = proxy::expire quota = maildir:User quota quota_rule = *:storage=100M quota_rule2 = Papelera:storage=+100M sieve = ~/sieve/dovecot.sieve sieve_before = /usr/local/etc/sieve/spam.sieve sieve_dir = ~/sieve sieve_global_dir = /usr/local/etc/sieve/ } postmaster_address = postmaster@d postmaster@uvq.edu.aromain protocols = imap sieve pop3 service auth { unix_listener /var/spool/postfix/private/auth { mode = 0666 } unix_listener auth-userdb { mode = 0600 user = vmail } } service dict { unix_listener dict { mode = 0600 user = vmail } } service managesieve-login { inet_listener sieve { port = 4190 } vsz_limit = 64 M } ssl_cert =
-- Ramiro Blanco
On 22.11.2011, at 22.52, Ramiro Blanco wrote:
Hi, I found that doing a wildcard search with doveadm doesn't expand the %d global variable when doing a wildcard search like:
Nov 22 20:48:07 auth-worker: Debug: ldap: iterate: base=vd=%d,dc=domain scope=subtree
Iteration is supposed to iterate through all users..
Is this a bug?
More like a missing feature I guess. I guess it could make it expand the %d if it's known..
On Wed, 2011-11-23 at 00:56 +0200, Timo Sirainen wrote:
Hi, I found that doing a wildcard search with doveadm doesn't expand the %d global variable when doing a wildcard search like:
Nov 22 20:48:07 auth-worker: Debug: ldap: iterate: base=vd=%d,dc=domain scope=subtree
Iteration is supposed to iterate through all users..
Is this a bug?
More like a missing feature I guess. I guess it could make it expand the %d if it's known..
hg version of v2.1 now supports this.
2011/11/23 Timo Sirainen tss@iki.fi:
hg version of v2.1 now supports this.
Does it need some extra configuration? I've upgraded to hg ver. of 2.1 and still the same error... Thanks for the quick response!
-- Ramiro Blanco
On Wed, 2011-11-23 at 18:19 -0300, Ramiro Blanco wrote:
2011/11/23 Timo Sirainen tss@iki.fi:
hg version of v2.1 now supports this.
Does it need some extra configuration?
No.
I've upgraded to hg ver. of 2.1 and still the same error...
Does it still show "%d" in the error messages, or is it "" now?
2011/11/23 Timo Sirainen tss@iki.fi:
Does it still show "%d" in the error messages, or is it "" now?
It still shows "%d"
Nov 23 18:42:59 auth-worker(729): Debug: ldap: iterate: base=vd=%d,dc=domain scope=subtree filter=(&(objectClass=VirtualMailAccount)(accountActive=TRUE)) fields=mail Nov 23 18:42:59 auth-worker(729): Error: ldap(): ldap_search((&(objectClass=VirtualMailAccount)(accountActive=TRUE))) failed: No such object
-- Ramiro Blanco
On Wed, 2011-11-23 at 19:08 -0300, Ramiro Blanco wrote:
2011/11/23 Timo Sirainen tss@iki.fi:
Does it still show "%d" in the error messages, or is it "" now?
It still shows "%d"
Nov 23 18:42:59 auth-worker(729): Debug: ldap: iterate: base=vd=%d,dc=domain scope=subtree
Actually only the debug message was wrong. The expansion should have worked. Anyway, fixed the debug message: http://hg.dovecot.org/dovecot-2.1/rev/1fed3c1c166e
2011/11/23 Timo Sirainen tss@iki.fi:
Actually only the debug message was wrong. The expansion should have worked. Anyway, fixed the debug message: http://hg.dovecot.org/dovecot-2.1/rev/1fed3c1c166e
Still failing: doveadm(root): Error: User listing returned failure doveadm: Error: Failed to iterate through some users
Now "%d" it's empty, it shows "vd=" instead of "vd=%d":
Nov 23 22:50:46 auth-worker(26556): Debug: ldap: iterate: base=vd=,dc=uvq,dc=edu,dc=ar scope=subtree filter=(&(objectClass=VirtualMailAccount)(accountActive=TRUE)) fields=mail Nov 23 22:50:46 auth-worker(26556): Error: ldap(): ldap_search((&(objectClass=VirtualMailAccount)(accountActive=TRUE))) failed: No such object
It is supposed to parse domain part from input in "doveadm search *@domain ..", right?
-- Ramiro Blanco
On 24.11.2011, at 4.00, Ramiro Blanco wrote:
Now "%d" it's empty, it shows "vd=" instead of "vd=%d":
It is supposed to parse domain part from input in "doveadm search *@domain ..", right?
Too tired to test search myself now, but this is what I used to test it myself:
doveadm user '*@domain'
If that works, then the problem is with doveadm and it needs more patching..
2011/11/23 Timo Sirainen tss@iki.fi:
Too tired to test search myself now, but this is what I used to test it myself:
You've done too much already!
doveadm user '*@domain'
If that works, then the problem is with doveadm and it needs more patching..
That works just fine. I guess it needs some patching then.
-- Ramiro Blanco
participants (2)
-
Ramiro Blanco
-
Timo Sirainen