Getting egos-tech/smtp or namshi/docker-smtp to accept IPv6 as RELAY_NETWORKS

I have recently been migrating my docker based workload to a dualstack (IPv4 + IPv6) enabled Kuberntes cluster. 

In this cluster I needed a SMTP Relay so that emails can be relayed out through my Google Apps account. 

The default deployment of egos-tech/smtp states that

The container accepts RELAY_NETWORKS environment variable which MUST start with : e.g :192.168.0.0/24 or :192.168.0.0/24:10.0.0.0/16.

I tried various things getting IPv6 address into the list, and after a large number of trial-and-error, I managed to get it to work with this config:

---
apiVersion: v1
kind: ConfigMap
metadata:
    name: smtp-config
    data:
        RELAY_NETWORKS: ";10.0.0.0/8;127.0.0.0/8;172.16.0.0/12;192.168.0.0/16;fd00::/8"


I believe the first letter in the environment variable actually doesn't need to start with a colon, instead it defines the delimiter. By switching it from a colon to semi-colon, it avoids conflicting with the colon used in IPv6 address. 

Inspiration came from this remotely related post




Comments

Popular posts from this blog

Android Samsung Print Service Plugin - unable to print

UK Virgin Media Hub 4 Link Aggregation is very broken (balance-rr)

Anker Charger (130W, 6 Ports, GaN) (A2155) Mini Review