Hi folx,
for a new dockerized exim setup I'm trying to use environment variables
to customize some settings in the exim config file.
My exim4.config sample:
```
...
keep_environment = EH : EXIM_HOSTNAME : EXIM_HELONAME
smtp_active_hostname = ${env{EXIM_HOSTNAME}{$value}{hostname-undefined}}
...
begin transports
...
remote_smtp:
...
# helo_data = ${env{EXIM_HELONAME}{$value}{heloname-undefined}}
helo_data = ${env {EXIM_HELONAME}}
...
# for debugging only:
headers_add = "X-HOSTNAME: ${env {EXIM_HOSTNAME}}"
headers_add = "X-EH: ${env {EH}}"
headers_add = "X-EXIM_HELONAME: ${env {EXIM_HELONAME}}"
```
My test:
export EXIM_HELONAME=myheloname
# restart exim
swaks --from="<>" --to=$ME --server=localhost
The result:
...
1 Received: from dck01.**** ([x.x.x.x] helo=)
2 by mail.* with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
...
14 Date: Wed, 29 Jul 2020 10:43:32 +0200
15 To: fh@???
16 From:
17 Subject: test Wed, 29 Jul 2020 10:43:32 +0200
18 Message-Id: <20200729104332.003268@14c3c675c896>
19 X-Mailer: swaks v20181104.0 jetmore.org/john/code/swaks/
20 X-HOSTNAME:
21 X-EH:
22 X-EXIM_HELONAME:
...
As you can see, neither heloname is set (line 1), nor the additional
headerlines (lines 20-22) are.
Strangely enough, setting the active hostname works:
export EXIM_HOSTNAME=myeximhostname
# restart exim
telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 myeximhostname custom MTA conf v3.0 Wed, 29 Jul 2020 11:28:48 +0200
^^^^^^^^^^^^^^
The basic system is:
Debian GNU/Linux 10
Exim version 4.92 #3 built 13-May-2020 16:01:31
Anybody here could give me a hint, why setting smtp_active_hostname works
but helo_data or headers_add does not?
--
Best regards
Frank