Use default function:
%{ldap:quota_over|default('')}
Aki
> On 18/03/2025 08:26 EET luis.neapolis--- via dovecot <[email protected]>
> wrote:
>
>
> Hello,
> I have just upgraded to 2.4 dovecot version from 2.3.x. I converted the
> configurations and now I have the following problem:
>
> I have a userdb with LDAP:
>
> userdb ldap {
> driver = ldap
> ldap_filter = (&(objectClass=Emails) (mail=%{user}) )
> fields {
> quota_rule = %{ldap:quota}
> quota_over_status_current = %{ldap:quota_over}
> ....... and so on
> }
> }
>
> As, not all the users have quota_over set in ldap, quota_over doesn't always
> exist. With 2.3 version there was no problem even if it doesn't exist.
> Now I have the following error and userdb reports failed:
>
> dovecot dovecot[107831]: auth(user@domain): Debug: ldap: result: [.....
> others attributes .....] quota_over missing
> dovecot dovecot[107831]: auth(user@domain): Error: ldap: auth_userdb_post
> settings: Failed to parse configuration: Failed to expand
> userdb_fields/quota_over_status_current setting variables: No such LDAP
> attribute 'quota_over'
> dovecot dovecot[107831]: auth(user@domain): Debug: ldap: Finished userdb
> lookup
> dovecot dovecot[107831]: auth: Debug: userdb out: FAIL#0111
>
> I tried to add a default value:
>
> quota_over_status_current = %{ldap:quota_over:TRUE}
>
> but it seems that it supposes that the name of the attribute is
> quota_over:TRUE and fails.
>
> Any suggestions?
> Thank you.
> _______________________________________________
> dovecot mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]