[exim] A couple questions about strings expansion using ${a…

Góra strony
Delete this message
Reply to this message
Autor: Marcin Mirosław
Data:  
Dla: exim-users
Temat: [exim] A couple questions about strings expansion using ${addresses} from header
Hi,
Firstly I wish all the best in 2021 year!

I have a couple of cases which makes me scratching the head.

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. Why exim doesn't add hostname in invocation with "-be"?
Shouldn't behave in the same way?

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


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?

4. All above was because I wanted to reject messages when header From is
more than once in email:) I did:
${if >{${listcount:${addresses:$h_from:}}}{1}{yes}{no}}

which triggered a couple of problems described earlier.

Marcin