Hi,

In a new dovecot 2.4 config I'm setting up a inet_listener for a service.
I want to use an env var in `listen` expansion, like

  service imap-login {
    inet_listener imaps {
      listen = %{env:LAN_IPv4}, 127.0.0.1
    }
  }


This

  https://doc.dovecot.org/2.4.1/core/settings/variables.html

says

  "You can use special variables in several places:
    All settings, except of type String without variables."

Reading

  https://doc.dovecot.org/2.4.1/core/summaries/settings.html#listen

`listen` directive allows

  listen
    Default  *, ::
    Value  IP addresses

Unlike, for example

  deliver_log_format
    Default  msgid=%{msgid}: %{message}
    Value  String without variables

which would be disallowed for "String without variables"

I CAN use env vars across almost all of my config.

But launch

  systemctl start dovecot

fails with

  dovecot[17358]: Fatal: service(imap-login) Can't resolve address 
%{env:LAN_IPv4}: Name or service not known

OTOH replacing

-       listen = %{env:LAN_IPv4}, 127.0.0.1
+       listen = 10.1.1.1, 127.0.0.1

solves the launch issue.

Like I said it works in other stanzas.
Am I configuring this right for `listen`?

Thanks,

Dave
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org

Reply via email to