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
> On 28 Sep 2018, at 15.25, Angel L. Mateo <amateo at um.es> wrote: > > 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.33I can't seem to be able to reproduce this, not even with v2.2.33. It simply works without logging any errors.
> > I can't seem to be able to reproduce this, not even with v2.2.33. It simply works without logging any errors. >I've made a lot of changes now. I can't neither reproduce it anymore :-(. If I could, I'll send the complete configuration. -- 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