Ahoj,

Dňa Sat, 27 May 2023 13:20:48 +0300 Victor Ustugov via Exim-users
<[email protected]> napísal:

> I think that in this case it is not necessary to use a very "horrible
> complicated" full RFC compliant regexp. It may be sufficient to ignore
> all parenthesized text after the last ">". Or even ignore all text in
> parentheses after the last ">".
> 
> ${if
> eq{${addresses:$rh_From:}}{}{${sg{$rh_From:}{\N^.*<(\S+?@\S+?)>[^>]*$\N}{\$1}}}{${addresses:$rh_From:}}}
> 

And then you get something as this:

    From: "[email protected]" <[email protected]> 
(<[email protected]>)

:-)))

My point was, that regex can be not reliable too.

I consider the ${address:} expansion as way to prevent needing that
anyone have to develop own parser, which can end in ugly or even wrong
way as not all (including me) are regex experts...

I do not expect, that ${address:} will parse any wrong syntax. I can
accept, that it can fail in some corner cases of valid syntax. But
i expect, that when header will pass the header_syntax check, then that
expansion will be able to parse it, otherwise something is wrong.

regards

-- 
Slavko
https://www.slavino.sk

Attachment: pgprc3UyMGpVi.pgp
Description: Digit??lny podpis OpenPGP

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

Reply via email to