[exim] Re: Completely remove any name in From: header for in…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Slavko
Dátum:  
Címzett: exim-users
Tárgy: [exim] Re: Completely remove any name in From: header for inbound email?
Ahoj,

Dňa Sat, 27 May 2023 13:20:48 +0300 Victor Ustugov via Exim-users
<exim-users@???> 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: "postmaster@???" <charles@???> (<confuse@???>)


:-)))

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

--
## 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/