Re: Variable expansion with variables containing '%' (ldap with 2.3.6)
Am Tue, 2 Jul 2019 08:51:24 +0300 schrieb Aki Tuomi : > On 2.7.2019 8.24, Aki Tuomi via dovecot wrote: > > On 1.7.2019 13.37, Matthias Lay via dovecot wrote: > >> Am Mon, 1 Jul 2019 13:08:46 +0300 (EEST) > >> schrieb Aki Tuomi : > >> > >>> Hi, > >>> > >>> there seems to be a problem when expanding variables containing a > >>> single '%' in value in dovecot V2.3.6 > >>> > >>> having a user defined Variable in user_attrs like > >>> > >>> user_attrs = name=home=/maildir/%Ln, > >>> =myvar=path/%L{ldap:sAMAccountName} > >>> > >>> > >>> and sAMAccountName conains a '%', in my example "sonder%zeichen" > >>> leads to: > >>> > >>> lda(sonder%zeichen)<5723>: Fatal: Failed > >>> to expand plugin setting myvar = 'path/sonder%zeichen': Unknown > >>> variable '%z' > >>> > >>> same setup works with dovecot 2.2.29 > >>> > >>> Any Feedback appreciated. > >>> Thanks. > >>> Matze > >>> > >>> You can use %% to escape a % > >>> --- > >>> Aki Tuomi > >>> > >> Hi Aki, > >> > >> nope this doesnt work. if I use 'sonder%%zeichen', the ldap lookup > >> searches for the User/Value "sonder%%zeichen" in ldap/AD. what > >> fails, as this user doesnt exist. > >> > >> and I cant escape the value in all cases anyway, as its an remote > >> value, coming from the ldap server. > >> > >> seems to me the sequence of intepreting variables and modifiers > >> changed between 2.2 ans 2.3 > >> now it gets the variable value from remote in the first place, and > >> interprets the value itself for more variables or modifiers, which > >> might not be what you want. > >> > >> like in a subquery using > >> > >> @mail=%{ldap:mailDN} > >> > >> but I dont use subqueries. just a simple expansion > >> > >> =myvar=%{ldap:mailDN} > >> > >> any more ideas? > >> > >> > >> > >> > >> > > I have to investigate this a bit. > > > > > > Aki > > > > Seems to be a bug of a kind. I'll open it in our issue tracker. > > Aki > thx for your effort Aki. If I can help out testing a patch, just let me know Matze
Re: Variable expansion with variables containing '%' (ldap with 2.3.6)
On 2.7.2019 8.24, Aki Tuomi via dovecot wrote: > On 1.7.2019 13.37, Matthias Lay via dovecot wrote: >> Am Mon, 1 Jul 2019 13:08:46 +0300 (EEST) >> schrieb Aki Tuomi : >> >>> Hi, >>> >>> there seems to be a problem when expanding variables containing a >>> single '%' in value in dovecot V2.3.6 >>> >>> having a user defined Variable in user_attrs like >>> >>> user_attrs = name=home=/maildir/%Ln, >>> =myvar=path/%L{ldap:sAMAccountName} >>> >>> >>> and sAMAccountName conains a '%', in my example "sonder%zeichen" >>> leads to: >>> >>> lda(sonder%zeichen)<5723>: Fatal: Failed to >>> expand plugin setting myvar = 'path/sonder%zeichen': Unknown >>> variable '%z' >>> >>> same setup works with dovecot 2.2.29 >>> >>> Any Feedback appreciated. >>> Thanks. >>> Matze >>> >>> You can use %% to escape a % >>> --- >>> Aki Tuomi >>> >> Hi Aki, >> >> nope this doesnt work. if I use 'sonder%%zeichen', the ldap lookup >> searches for the User/Value "sonder%%zeichen" in ldap/AD. what fails, as >> this user doesnt exist. >> >> and I cant escape the value in all cases anyway, as its an remote >> value, coming from the ldap server. >> >> seems to me the sequence of intepreting variables and modifiers changed >> between 2.2 ans 2.3 >> now it gets the variable value from remote in the first place, and >> interprets the value itself for more variables or modifiers, which >> might not be what you want. >> >> like in a subquery using >> >> @mail=%{ldap:mailDN} >> >> but I dont use subqueries. just a simple expansion >> >> =myvar=%{ldap:mailDN} >> >> any more ideas? >> >> >> >> >> > I have to investigate this a bit. > > > Aki > Seems to be a bug of a kind. I'll open it in our issue tracker. Aki
Re: Variable expansion with variables containing '%' (ldap with 2.3.6)
On 1.7.2019 13.37, Matthias Lay via dovecot wrote: > Am Mon, 1 Jul 2019 13:08:46 +0300 (EEST) > schrieb Aki Tuomi : > >> Hi, >> >> there seems to be a problem when expanding variables containing a >> single '%' in value in dovecot V2.3.6 >> >> having a user defined Variable in user_attrs like >> >> user_attrs = name=home=/maildir/%Ln, >> =myvar=path/%L{ldap:sAMAccountName} >> >> >> and sAMAccountName conains a '%', in my example "sonder%zeichen" >> leads to: >> >> lda(sonder%zeichen)<5723>: Fatal: Failed to >> expand plugin setting myvar = 'path/sonder%zeichen': Unknown >> variable '%z' >> >> same setup works with dovecot 2.2.29 >> >> Any Feedback appreciated. >> Thanks. >> Matze >> >> You can use %% to escape a % >> --- >> Aki Tuomi >> > Hi Aki, > > nope this doesnt work. if I use 'sonder%%zeichen', the ldap lookup > searches for the User/Value "sonder%%zeichen" in ldap/AD. what fails, as > this user doesnt exist. > > and I cant escape the value in all cases anyway, as its an remote > value, coming from the ldap server. > > seems to me the sequence of intepreting variables and modifiers changed > between 2.2 ans 2.3 > now it gets the variable value from remote in the first place, and > interprets the value itself for more variables or modifiers, which > might not be what you want. > > like in a subquery using > > @mail=%{ldap:mailDN} > > but I dont use subqueries. just a simple expansion > > =myvar=%{ldap:mailDN} > > any more ideas? > > > > > I have to investigate this a bit. Aki
Re: Variable expansion with variables containing '%' (ldap with 2.3.6)
Am Mon, 1 Jul 2019 13:08:46 +0300 (EEST) schrieb Aki Tuomi : > Hi, > > there seems to be a problem when expanding variables containing a > single '%' in value in dovecot V2.3.6 > > having a user defined Variable in user_attrs like > > user_attrs = name=home=/maildir/%Ln, > =myvar=path/%L{ldap:sAMAccountName} > > > and sAMAccountName conains a '%', in my example "sonder%zeichen" > leads to: > > lda(sonder%zeichen)<5723>: Fatal: Failed to > expand plugin setting myvar = 'path/sonder%zeichen': Unknown > variable '%z' > > same setup works with dovecot 2.2.29 > > Any Feedback appreciated. > Thanks. > Matze > > You can use %% to escape a % > --- > Aki Tuomi > Hi Aki, nope this doesnt work. if I use 'sonder%%zeichen', the ldap lookup searches for the User/Value "sonder%%zeichen" in ldap/AD. what fails, as this user doesnt exist. and I cant escape the value in all cases anyway, as its an remote value, coming from the ldap server. seems to me the sequence of intepreting variables and modifiers changed between 2.2 ans 2.3 now it gets the variable value from remote in the first place, and interprets the value itself for more variables or modifiers, which might not be what you want. like in a subquery using @mail=%{ldap:mailDN} but I dont use subqueries. just a simple expansion =myvar=%{ldap:mailDN} any more ideas?
Re: Variable expansion with variables containing '%' (ldap with 2.3.6)
Hi, there seems to be a problem when expanding variables containing a single '%' in value in dovecot V2.3.6 having a user defined Variable in user_attrs like user_attrs = name=home=/maildir/%Ln, =myvar=path/%L{ldap:sAMAccountName} and sAMAccountName conains a '%', in my example "sonder%zeichen" leads to: lda(sonder%zeichen)<5723>: Fatal: Failed to expand plugin setting myvar = 'path/sonder%zeichen': Unknown variable '%z' same setup works with dovecot 2.2.29 Any Feedback appreciated. Thanks. Matze You can use %% to escape a % --- Aki Tuomi
Variable expansion with variables containing '%' (ldap with 2.3.6)
Hi, there seems to be a problem when expanding variables containing a single '%' in value in dovecot V2.3.6 having a user defined Variable in user_attrs like user_attrs = name=home=/maildir/%Ln, =myvar=path/%L{ldap:sAMAccountName} and sAMAccountName conains a '%', in my example "sonder%zeichen" leads to: lda(sonder%zeichen)<5723>: Fatal: Failed to expand plugin setting myvar = 'path/sonder%zeichen': Unknown variable '%z' same setup works with dovecot 2.2.29 Any Feedback appreciated. Thanks. Matze
Variable expansion with variables containing '%' (ldap with 2.3.6)
Hi, there seems to be a problem when expanding variables containing a single '%' in value in dovecot V2.3.6 having a user defined Variable in user_attrs like user_attrs = name=home=/maildir/%Ln, =myvar=path/%L{ldap:sAMAccountName} and sAMAccountName conains a '%', in my example "sonder%zeichen" leads to: lda(sonder%zeichen)<5723>: Fatal: Failed to expand plugin setting myvar = 'path/sonder%zeichen': Unknown variable '%z' same setup works with dovecot 2.2.29 Any Feedback appreciated. Thanks. Matze