Bug in conditionals to assign values to variables?

Angel L. Mateo amateo at um.es
Tue Oct 2 11:01:34 EEST 2018


	Sorry for my last mail. I didn't save the file before reloading dovecot.

passdb {
   args = /etc/dovecot/dovecot-ldap.conf.ext
   driver = ldap
}

userdb {
   driver = prefetch
}
userdb {
   args = /etc/dovecot/dovecot-ldap-userdb.conf.ext
   driver = ldap
}

auth_debug =yes
auth_verbose =yes


	In dovecot-ldap-userdb.conf.ext I have:

user_attrs = 
=user=%{ldap:mail},=quota_rule=%{ldap:quota:*:storage=10G},=home_prefix=/mail/mailboxes/%L{domain},=index_prefix=/mail/indexes/%L{domain},=relpath=%{if;%{username};~;^.+;%2L{username}/%L{username};other_value}

	In dovecot-ldap.conf.ext I have:
pass_attrs = 
=userdb_user=%{ldap:mail},=userdb_quota_rule=%{ldap:quota:*:storage=10G},=userdb_home_prefix=/mail/mailboxes/%L{domain},=userdb_index_prefix=/mail/indexes/%L{domain},=userdb_relpath=%{if;%{username};~;^.+;%2L{username}/%L{username};other_value}

	And this the log I have for a "doveadm user angel.luis at um.es" command:

Oct  2 09:59:49 myotis60 dovecot: auth: Debug: Loading modules from 
directory: /usr/lib/dovecot/modules/auth
Oct  2 09:59:49 myotis60 dovecot: auth: Debug: Module loaded: 
/usr/lib/dovecot/modules/auth/lib20_auth_var_expand_crypt.so
Oct  2 09:59:49 myotis60 dovecot: auth: Debug: Loading modules from 
directory: /usr/lib/dovecot/modules/auth
Oct  2 09:59:49 myotis60 dovecot: auth: Debug: Module loaded: 
/usr/lib/dovecot/modules/auth/libauthdb_ldap.so
Oct  2 09:59:49 myotis60 dovecot: auth: Debug: Read auth token secret 
from /var/run/dovecot/auth-token-secret.dat
Oct  2 09:59:49 myotis60 dovecot: auth: Debug: master in: 
USER#0111#011angel.luis at um.es#011service=doveadm#011debug
Oct  2 09:59:49 myotis60 dovecot: auth: Debug: 
prefetch(angel.luis at um.es): passdb didn't return userdb entries, trying 
the next userdb
Oct  2 09:59:49 myotis60 dovecot: auth: Error: 
var_expand_long(if;%{username}) failed: if: requires four or five 
parameters, got 1
Oct  2 09:59:49 myotis60 dovecot: auth: Debug: ldap(angel.luis at um.es): 
userdb cache miss
Oct  2 09:59:49 myotis60 dovecot: auth: Debug: ldap(angel.luis at um.es): 
user search: base=ou=Usuarios,dc=Telematica scope=subtree 
filter=(&(objectClass=CourierMailAccount)(irisUserStatus=urn:mace:rediris.es:um.es:userstatus:correo:estado:activo)(irisMailhost=popimapclu11.um.es)(|(uid=angel.luis at um.es)(mail=angel.luis at um.es))) 
fields=mail,quota
Oct  2 09:59:49 myotis60 dovecot: auth: Debug: ldap(angel.luis at um.es): 
result: mail=angel.luis at um.es quota=*:storage=10G; mail,quota unused
Oct  2 09:59:49 myotis60 dovecot: auth: Debug: ldap(angel.luis at um.es): 
result: mail=angel.luis at um.es quota=*:storage=10G
Oct  2 09:59:49 myotis60 dovecot: auth: Error: 
var_expand_long(if;%{username}) failed: if: requires four or five 
parameters, got 1
Oct  2 09:59:49 myotis60 dovecot: auth: Debug: userdb out: 
USER#0111#011angel.luis at um.es#011quota_rule=*:storage=10G#011home_prefix=/mail/mailboxes/um.es#011index_prefix=/mail/indexes/um.es#011relpath=an/angel.luis

-- 
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868889150
Fax: 868888337


More information about the dovecot mailing list