RFE: Customizable transport maps for postfix
Containers are ephemeral and aren't meant to persist, so, the traditional model of computing where a static IP or hostname is assigned to a node doesn't work. The network routing is based on custom rules built into the orchestration frameworks taking into account the load balancing, duplication, fault tolerance etc.
Right now in Core, when you provide a lmtp_host
in [mta]
configuration, that is used to bind the local socket and generate the transport maps. This makes things hard as every time the container boots up, it could potentially have a separate IP and Hostname.
To make the Core work, one could put 0.0.0.0
to lmtp_host
to listen on all interfaces, however, that would mean transport maps would look something like lmtp:[0.0.0.0]:8024
for a typical list and it wouldn't work when the email is being routed from somewhere outside the container. Using a hostname would mostly work if there are single instances of the containers, but not when there are replicas (each replica would have a separate hostname then and Postfix would be confused which one to route to). Also, as of now, Docker host doesn't have hostname->IP address mappings, so the condition where postfix would be running on host wouldn't work.
I understand that workarounds exist to make things work outside of Core, but it would be a little easier if Core could generate maps with a custom value of hostname/IP which the Core itself can't bind to but will be used externally for routing purposes.