[exim] Re: SMTP AUTH with passwords starting with <

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Jeremy Harris
Data:  
Para: exim-users
Assunto: [exim] Re: SMTP AUTH with passwords starting with <
On 25/10/2024 11:22, Frank Richter via Exim-users wrote:
> Oh well … now how to avoid this? Is this a workaround:
>
> server_condition = "${if pam{$auth2:<:${sg{$auth3}{:}{::}}}{yes}{no}}"


Almost.  You need

    pam{<: $auth2:${sg{$auth3}{:}{::}}

since the list-sep specification has to lead the list content
(per the documentation.  Do not rely on current behaviour,
where setting it part-way through a list happens to work; the
implementation could change in a future release.)

Note that this also changes the interpretation of usernames
that start with a "<".  I hope you have none such...

Also, the docs suggest a "listquote" rather than the "sg"
you have for dealing with colons embedded in the string,
giving

     pam{<: $auth2:${listquote{:}{$auth3}}


It could be argued that the "listquote" expansion item should
itself handle a leading "<" - but that would not work for cases
like this where we're dealing with a non-first list member.

Maybe we need another way of building lists; eg.

    pam{ ${listmake {:}{$auth2}{$auth3}{third_element}{last_element}} }
-- 
Cheers,
   Jeremy


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/