From 817e4e0f8747feb2dd2230544e90b8d7cbda0deb Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Thu, 21 May 2020 20:42:25 +0200 Subject: [PATCH] add POSTFIX_PORT param --- app/config.py | 5 +++++ example.env | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/config.py b/app/config.py index 648d08f1..218613c5 100644 --- a/app/config.py +++ b/app/config.py @@ -69,6 +69,11 @@ POSTFIX_SERVER = os.environ.get("POSTFIX_SERVER", "240.0.0.1") DISABLE_REGISTRATION = "DISABLE_REGISTRATION" in os.environ +# allow using a different postfix port, useful when developing locally +POSTFIX_PORT = None +if "POSTFIX_PORT" in os.environ: + POSTFIX_PORT = int(os.environ["POSTFIX_PORT"]) + # Use port 587 instead of 25 when sending emails through Postfix # Useful when calling Postfix from an external network POSTFIX_SUBMISSION_TLS = "POSTFIX_SUBMISSION_TLS" in os.environ diff --git a/example.env b/example.env index 67823ce5..f55db586 100644 --- a/example.env +++ b/example.env @@ -133,4 +133,8 @@ FACEBOOK_CLIENT_SECRET=to_fill # Disable onboarding emails # For self-hosted instance -DISABLE_ONBOARDING=true \ No newline at end of file +DISABLE_ONBOARDING=true + +# By default use postfix port 25. This param is used to override the Postfix port, +# useful when using another SMTP server when developing locally +# POSTFIX_PORT=1025 \ No newline at end of file