On 21/04/2021 07:39, Luca Bertoncello via Exim-users wrote:
warn set acl_m_from = ${domain:${sg {$h_from:} {^\N(.*)?\<(.*)?\>$\N} {\$1}}}
Unfortunately, if the FROM-Header contains a comma (eg: "Tester, Test
<[email protected]>") it fails.
acl_m_from is empty
# exim -d-all+expand -be
[...]
FOO=Tester, Test <[email protected]>
Defined macro 'FOO'
${domain:${sg {FOO} {^\N(.*)?\<(.*)?\>$\N} {\$1}}}
╭considering: ${domain:${sg {Tester, Test <[email protected]>}
{^\N(.*)?\<(.*)?\>$\N} {\$1}}}
╭considering: ${sg {Tester, Test <[email protected]>}
{^\N(.*)?\<(.*)?\>$\N} {\$1}}}
╭considering: Tester, Test <[email protected]>} {^\N(.*)?\<(.*)?\>$\N}
{\$1}}}
├──expanding: Tester, Test <[email protected]>
╰─────result: Tester, Test <[email protected]>
╭considering: ^\N(.*)?\<(.*)?\>$\N} {\$1}}}
├──expanding: ^\N(.*)?\<(.*)?\>$\N
╰─────result: ^(.*)?\<(.*)?\>$
╭considering: \$1}}}
├──expanding: \$1
╰─────result: $1
╭considering: $1
├──expanding: $1
╰─────result: Tester, Test
├──expanding: ${sg {Tester, Test <[email protected]>}
{^\N(.*)?\<(.*)?\>$\N} {\$1}}
╰─────result: Tester, Test
├──expanding: ${domain:${sg {Tester, Test <[email protected]>}
{^\N(.*)?\<(.*)?\>$\N} {\$1}}}
╰─────result:
--
Cheers,
Jeremy
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/