From 30a6fd3bd75a85c40906c0983f87073826595a26 Mon Sep 17 00:00:00 2001 From: Luke Faraone Date: Mon, 3 Feb 2014 15:25:13 -0500 Subject: [PATCH] [manual] Enable postfix email mirror on staging This will cause us to recieve messages sent to streams.staging.zulip.com via the local Postfix daemon running on staging. This commit does not impact prod. To deploy, a puppet-apply is needed on staging. (imported from commit 9eaedc28359f55a65b672a2e078c57362897c0de) --- .../zulip_internal/manifests/staging_app_frontend.pp | 1 + zproject/local_settings.py | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/puppet/zulip_internal/manifests/staging_app_frontend.pp b/puppet/zulip_internal/manifests/staging_app_frontend.pp index 4ac233c6db..1c4aa4cdf5 100644 --- a/puppet/zulip_internal/manifests/staging_app_frontend.pp +++ b/puppet/zulip_internal/manifests/staging_app_frontend.pp @@ -1,6 +1,7 @@ class zulip_internal::staging_app_frontend { include zulip_internal::base include zulip_internal::app_frontend + include zulip::postfix_localmail file { "/etc/nginx/sites-available/zulip-staging": require => Package["nginx-full"], diff --git a/zproject/local_settings.py b/zproject/local_settings.py index 741a9baad2..edeaeb3cde 100644 --- a/zproject/local_settings.py +++ b/zproject/local_settings.py @@ -161,9 +161,13 @@ else: EMAIL_GATEWAY_IMAP_FOLDER = "Test" # The email address pattern to use for auto-generated stream emails -# The %s will be replaced with a unique token, and the resulting email -# must be delivered to the Inbox of the EMAIL_GATEWAY_LOGIN account above -EMAIL_GATEWAY_PATTERN = "%s@streams.zulip.com" +# The %s will be replaced with a unique token. +if STAGING_DEPLOYED: + EMAIL_GATEWAY_PATTERN = "%s@streams.staging.zulip.com" +elif DEPLOYED: + EMAIL_GATEWAY_PATTERN = "%s@streams.zulip.com" +else: + EMAIL_GATEWAY_PATTERN = "%s@" + EXTERNAL_HOST SSO_APPEND_DOMAIN = None