mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
Allow omission of EMAIL_GATEWAY_BOT and stream emails
(imported from commit 51412d2a46bbacd6537ef892e7b6bdf33ac94079)
This commit is contained in:
@@ -48,12 +48,12 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{{#if subscribed}}
|
{{#if_and subscribed email_address}}
|
||||||
<div>
|
<div>
|
||||||
<p><b>Email address</b> <span class="email-address">{{email_address}}
|
<p><b>Email address</b> <span class="email-address">{{email_address}}
|
||||||
<i class="icon-vector-question-sign" id="email-address-hint-{{id}}"></i></span></p>
|
<i class="icon-vector-question-sign" id="email-address-hint-{{id}}"></i></span></p>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if_and}}
|
||||||
|
|
||||||
{{#if allow_rename}}
|
{{#if allow_rename}}
|
||||||
<div class="rename-stream">
|
<div class="rename-stream">
|
||||||
|
|||||||
@@ -1518,6 +1518,10 @@ def encode_email_address(stream):
|
|||||||
return encode_email_address_helper(stream.name, stream.email_token)
|
return encode_email_address_helper(stream.name, stream.email_token)
|
||||||
|
|
||||||
def encode_email_address_helper(name, email_token):
|
def encode_email_address_helper(name, email_token):
|
||||||
|
# Some deployments may not use the email gateway
|
||||||
|
if settings.EMAIL_GATEWAY_PATTERN == '':
|
||||||
|
return ''
|
||||||
|
|
||||||
# Given the fact that we have almost no restrictions on stream names and
|
# Given the fact that we have almost no restrictions on stream names and
|
||||||
# that what characters are allowed in e-mail addresses is complicated and
|
# that what characters are allowed in e-mail addresses is complicated and
|
||||||
# dependent on context in the address, we opt for a very simple scheme:
|
# dependent on context in the address, we opt for a very simple scheme:
|
||||||
|
|||||||
@@ -39,6 +39,29 @@ TWITTER_CONSUMER_SECRET = ''
|
|||||||
TWITTER_ACCESS_TOKEN_KEY = ''
|
TWITTER_ACCESS_TOKEN_KEY = ''
|
||||||
TWITTER_ACCESS_TOKEN_SECRET = ''
|
TWITTER_ACCESS_TOKEN_SECRET = ''
|
||||||
|
|
||||||
|
# The email gateway provides an email address that you can use to post to a stream
|
||||||
|
# Emails received at the per-stream email address will be converted into a Zulip
|
||||||
|
# message
|
||||||
|
|
||||||
|
# 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 EMAIL_GATEWAY_IMAP_FOLDER of the EMAIL_GATEWAY_LOGIN account below
|
||||||
|
EMAIL_GATEWAY_PATTERN = ""
|
||||||
|
|
||||||
|
# The Zulip username of the bot that the email pattern should post as
|
||||||
|
EMAIL_GATEWAY_BOT = ""
|
||||||
|
|
||||||
|
# Configuration of the email mirror mailbox
|
||||||
|
# The IMAP login and password
|
||||||
|
EMAIL_GATEWAY_LOGIN = ""
|
||||||
|
EMAIL_GATEWAY_PASSWORD = ""
|
||||||
|
# The IMAP server & port to connect to
|
||||||
|
EMAIL_GATEWAY_IMAP_SERVER = ""
|
||||||
|
EMAIL_GATEWAY_IMAP_PORT = 993
|
||||||
|
# The IMAP folder name to check for emails. All emails sent to EMAIL_GATEWAY_PATTERN above
|
||||||
|
# must be delivered to this folder
|
||||||
|
EMAIL_GATEWAY_IMAP_FOLDER = "INBOX"
|
||||||
|
|
||||||
# When using SSO: If REMOTE_USER only provides a username, append this domain
|
# When using SSO: If REMOTE_USER only provides a username, append this domain
|
||||||
# to the returned value.
|
# to the returned value.
|
||||||
SSO_APPEND_DOMAIN = None
|
SSO_APPEND_DOMAIN = None
|
||||||
|
|||||||
@@ -232,6 +232,7 @@ DEFAULT_SETTINGS = {'TWITTER_CONSUMER_KEY': '',
|
|||||||
'TWITTER_ACCESS_TOKEN_KEY': '',
|
'TWITTER_ACCESS_TOKEN_KEY': '',
|
||||||
'TWITTER_ACCESS_TOKEN_SECRET': '',
|
'TWITTER_ACCESS_TOKEN_SECRET': '',
|
||||||
'EMBEDLY_KEY': '',
|
'EMBEDLY_KEY': '',
|
||||||
|
'EMAIL_GATEWAY_PATTERN': '',
|
||||||
'EMAIL_GATEWAY_BOT': None,
|
'EMAIL_GATEWAY_BOT': None,
|
||||||
'EMAIL_GATEWAY_LOGIN': None,
|
'EMAIL_GATEWAY_LOGIN': None,
|
||||||
'EMAIL_GATEWAY_PASSWORD': None,
|
'EMAIL_GATEWAY_PASSWORD': None,
|
||||||
|
|||||||
Reference in New Issue
Block a user