Did you try enabling log_debug=category=auth to see what happens? Aki
> On 02/12/2026 10:48 EET Ben Hardill via dovecot <[email protected]> wrote: > > > Hello, Thanks for the suggestion, but it's still not working, I sitll get > > User doesn't exist: hardillb@localhost (in reply to RCPT TO command) > > when trying to deliver email to this user with the following in the > 20-lmtp.conf (both versions) > > protocol lmtp { > auth_username_format = %{user | regexp("@localhost$", "") | lower} > # auth_username_format = %{user | lower | regexp("@localhost", "")} > } > > but if I use > > protocol lmtp { > auth_username_format = %{user | username | lower} > } > > it works for this user, but not the ones that get looked up with the > none `@localhost` domains, they get looked up in a dedicated users file > with usernames that include the domain. (The @localhost users are looked > up via PAM hence needing to stip the domain) > > I've also tried it in the 10-auth.conf file as well but same problem > > Let me know if you need more informaton. > > Ben Hardill > > On 02/12/2026 06:32, Aki Tuomi wrote: > > 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] > > > > -- > 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]
