Bug in conditionals to assign values to variables?

Angel L. Mateo amateo at um.es
Fri Sep 28 15:25:35 EEST 2018


Hi,

	According to https://wiki2.dovecot.org/Variables you could use 
conditionals to assign values to a varible. The syntax is:

%{if;value1;operator;value2;value-if-true;value-if-false}

	where any of the fields can refer to another field using %v or %{value} 
syntax.

	The problem is that when I use a config like:

user_attrs = ...,=relpath=%{if;%u;eq;somevalue;valuetrue;valuefalse}

	it works without any problem. But when I use:

user_attrs = ...,=relpath=%{if;%{user};eq;somevalue;valuetrue;valuefalse}

	then it reports in logs:

Sep 28 14:23:22 myotis60 dovecot: auth: Error: 
var_expand_long(if;%{user}) failed: if: requires four or five 
parameters, got 1

	anyway, the variable is correctly initialized, but I get the log.

	Is this a bug?

PS: I'm running dovecot 2.2.33

-- 
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