From af8d75332cdb6605ae29872d2a9ac780afeb6438 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 23 Nov 2015 13:20:32 -0800 Subject: [PATCH] Move email_gateway_password to zulip-secrets.conf. --- zproject/local_settings_template.py | 6 +++--- zproject/settings.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/zproject/local_settings_template.py b/zproject/local_settings_template.py index 1e657088ca..6f9f601451 100644 --- a/zproject/local_settings_template.py +++ b/zproject/local_settings_template.py @@ -205,11 +205,11 @@ EMAIL_GATEWAY_PATTERN = "" # which will check that inbox and batch-process any new messages. # # You will need to configure authentication for the email mirror -# command to access the IMAP mailbox below. +# command to access the IMAP mailbox below and in zulip-secrets.conf. # -# The IMAP login and password +# The IMAP login; username here and password as email_gateway_login in +# zulip-secrets.conf. EMAIL_GATEWAY_LOGIN = "" -EMAIL_GATEWAY_PASSWORD = "" # The IMAP server & port to connect to EMAIL_GATEWAY_IMAP_SERVER = "" EMAIL_GATEWAY_IMAP_PORT = 993 diff --git a/zproject/settings.py b/zproject/settings.py index dab05d5357..dc33378ded 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -929,6 +929,8 @@ else: EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST_PASSWORD = get_secret('email_password') +if "EMAIL_GATEWAY_PASSWORD" not in vars(): + EMAIL_GATEWAY_PASSWORD = get_secret('email_gateway_password') ######################################################################## # MISC SETTINGS