Auteur: Jeremy Harris Date: À: exim-users Sujet: Re: [exim] A couple questions about strings expansion using
${addresses} from header
On 31/12/2020 12:17, Marcin Mirosław via Exim-users wrote: > 1. Difference in behaviour when I use "-be" vs "-bem":
>
> # cat /tmp/test2
> From: =?utf-8?B?YWFhYS1hYWFhLCBiYmJiYg==?=
> # exim -bem /tmp/test2 '${addresses:$h_from:}'
> aaaa-aaaa:bbbbb@???
>
> # exim -be '${addresses:$h_from:From: =?utf-8?B?YWFhYS1hYWFhLCBiYmJiYg==?= }'
> =?utf-8?B?YWFhYS1hYWFhLCBiYmJiYg==?=
>
> Why exim -bem adds hostname to parsed header? I expect exim should not add anything.
Per the discussion of the local_from_check config option:
"An unqualified address (no domain) in the From: header
in a locally submitted message is automatically qualified
by Exim, unless the -bnq command line option is used"
> Why exim doesn't add hostname in invocation with "-be"?
Because your expansion had no From: header to work with,
and the only string left was the thing starting with an =
that you explicitly gave it.
>
> 2. comma in addresses:
>
> # cat /tmp/test2
> From: =?utf-8?B?YWFhYS1hYWFhLCBiYmJiYg==?= <a@???>
> # exim -bem /tmp/test2 '${addresses:$h_from:}'
> aaaa-aaaa:a@???
>
> Why exim sees two addresses? There is no literally coma, comma is encoded with base64. There is in doc "It does not see the comma because it’s still encoded as "=2C" ", so meseems it still shouldn't interpret comma also for base64
The doc sentence is discussing use of $rheader_from: - which is the Q-coded
string. You used $header_from: - which has been decoded, so has a
visible comma.
>
>
> 3. "-be" vs "-bem". The same header as above.
> # cat /tmp/test2
> From: =?utf-8?B?YWFhYS1hYWFhLCBiYmJiYg==?= <a@???>
> # exim -bem /tmp/test2 '${addresses:$h_from:}'
> aaaa-aaaa:a@???
>
> vs
> # exim -be '${addresses:$h_from:From: =?utf-8?B?YWFhYS1hYWFhLCBiYmJiYg==?= <a@???>}'
> a@???
>
> Shouldn't be result of expansion the same in both cases?
No, for the multiple reasons described above.
--
Cheers,
Jeremy