Ramiro Blanco
2011-Nov-22 20:52 UTC
[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 at d <postmaster at uvq.edu.ar>omain 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 = </etc/ssl/certs/dovecot.pem ssl_key = </etc/ssl/private/dovecot.pem userdb { args = /usr/local/etc/dovecot/dovecot-ldap.conf.ext driver = ldap } protocol lda { mail_plugins = quota autocreate expire } protocol imap { mail_plugins = quota autocreate expire imap_quota } protocol sieve { mail_plugins managesieve_implementation_string = Dovecot Pigeonhole managesieve_logout_format = bytes=%i/%o } -- Ramiro Blanco
Timo Sirainen
2011-Nov-22 22:56 UTC
[Dovecot] "%d" does not expand to domain on wildcard search
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=subtreeIteration 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..
Timo Sirainen
2011-Nov-23 23:13 UTC
[Dovecot] "%d" does not expand to domain on wildcard search
On Wed, 2011-11-23 at 19:08 -0300, Ramiro Blanco wrote:> 2011/11/23 Timo Sirainen <tss at 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=subtreeActually 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