It might work better if you export LAN_IPv6 as [address]. The current $ENV: expansion is whitespace delimited.
Aki
On 20/09/2025 16:52 EEST publists--- via dovecot <dovecot@dovecot.org> wrote:
Hi,
On Sat, Sep 20, 2025, at 9:13 AM, Aki Tuomi via dovecot wrote:
Can you try
listen = $ENV:LAN_IPv4 , 127.0.0.1
note the space before comma
Aki
With
cat dovecot.conf
importEironment { E_LAN_IPv4 = %{env:LAN_IPv4} E_LAN_IPv6 = %{env:LAN_IPv6} }
cat dovecot.env
LAN_IPv4=10.1.1.1 LAN_IPv6=fd80:10:1::1
cat /etc/systemd/system/dovecot-current.service
EnvironmentFile=/etc/dovecot/dovecot.env
This works
listen = 10.1.1.1, 127.0.0.1, [fd80:10:1::1], [::1]
This fails
listen = $ENV:E_LAN_IPv4 , 127.0.0.1, [$ENV:E_LAN_IPv6] , [::1]
This works
listen = $ENV:E_LAN_IPv4 , 127.0.0.1, $ENV:E_LAN_IPv6 , [::1]
This fails
listen = %{env:E_LAN_IPv4} , 127.0.0.1, [%{env:E_LAN_IPv6}] , [::1]
'works' so far just means that dovecot starts up without complaining.
I didn't yet TEST the listeners.
Dave
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org