That's not how it works. What you want is %{user | lower | regexp("@localhost", 
"")}

Aki

> On 01/12/2026 15:20 EET Ben Hardill via dovecot <[email protected]> wrote:
> 
>  
> Hi,
> 
> I'm trying to migate an old if statement and I can't get it to work
> 
> auth_username_format = %{if;%d;eq;localhost;%Ln;%Lu}
> 
> I think it should be something like
> 
> auth_username_format = %{user | domain | if ('eq', 'localhost', {user 
> |username}, user) | lower }
> 
> but it throws errors when about the {} round user | username or the | if 
> I remove them.
> 
> Any suggestions?
> 
> The bigger picture is I have a mix of vitrual users and real local users 
> and a alias that remaps the local users
> 
> 
> -- 
> https://www.hardill.me.uk/wordpress
> https://github.com/hardillb
> https://about.me/hardillb
> https://flickr.com/photos/hardillb/
> https://keybase.io/hardillb
> 
> _______________________________________________
> 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]

Reply via email to