From 0931642d11b11249440da1d3febf63af37d6be4f Mon Sep 17 00:00:00 2001 From: Son Date: Sun, 20 Mar 2022 10:38:58 +0100 Subject: [PATCH] use 10.0.0.0 network instead of 240.0.0.0 --- README.md | 8 +++++--- app/config.py | 3 ++- docs/gmail-relay.md | 2 +- docs/troubleshooting.md | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 13272666..aff3d18d 100644 --- a/README.md +++ b/README.md @@ -217,8 +217,8 @@ Later, we will setup Postfix to authorize this network. ```bash sudo docker network create -d bridge \ - --subnet=240.0.0.0/24 \ - --gateway=240.0.0.1 \ + --subnet=10.0.0.0/24 \ + --gateway=10.0.0.1 \ sl-network ``` @@ -295,7 +295,7 @@ smtpd_tls_security_level = may # information on enabling SSL in the smtp client. alias_maps = hash:/etc/aliases -mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 240.0.0.0/24 +mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.0.0.0/24 # Set your domain here mydestination = @@ -408,6 +408,8 @@ FLASK_SECRET=put_something_secret_here GNUPGHOME=/sl/pgp LOCAL_FILE_UPLOAD=1 + +POSTFIX_SERVER=10.0.0.1 ``` diff --git a/app/config.py b/app/config.py index 97605cdc..9caf5396 100644 --- a/app/config.py +++ b/app/config.py @@ -109,7 +109,8 @@ MAX_NB_SUBDOMAIN = 5 ENFORCE_SPF = "ENFORCE_SPF" in os.environ -# allow to override postfix server locally +# override postfix server locally +# use 240.0.0.1 here instead of 10.0.0.1 as existing SL instances use the 240.0.0.0 network POSTFIX_SERVER = os.environ.get("POSTFIX_SERVER", "240.0.0.1") DISABLE_REGISTRATION = "DISABLE_REGISTRATION" in os.environ diff --git a/docs/gmail-relay.md b/docs/gmail-relay.md index 6a38d283..d4ab8ef5 100644 --- a/docs/gmail-relay.md +++ b/docs/gmail-relay.md @@ -74,7 +74,7 @@ smtpd_tls_security_level = may # information on enabling SSL in the smtp client. alias_maps = hash:/etc/aliases -mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 240.0.0.0/24 +mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.0.0.0/24 # Set your domain here mydestination = localhost.localdomain, localhost diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index d4ec529a..00e1116e 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -21,10 +21,10 @@ b) then run the following commands ```bash apt update apt install telnet -y -telnet 240.0.0.1 25 +telnet 10.0.0.1 25 ``` -If the `telnet 240.0.0.1 25` doesn't work, it means Postfix can't be reached from the docker container. +If the `telnet 10.0.0.1 25` doesn't work, it means Postfix can't be reached from the docker container. This means an issue with the Docker network. You can then try `telnet 172.17.0.1 25` as `172.17.0.1` is *usually* the host IP address. If this works, then you can set