Remove certain hardcoded email addresses in Zephyr mirroring.

(imported from commit 9fd492b5463f04741558687f27522d48a5dc795b)
This commit is contained in:
Tim Abbott 2015-09-20 00:35:54 -07:00
parent 36a9dc2cf7
commit 80a8725a03
2 changed files with 2 additions and 2 deletions

View File

@ -370,7 +370,7 @@ def process_notice(notice, log):
if is_personal: if is_personal:
if body.startswith("CC:"): if body.startswith("CC:"):
is_huddle = True is_huddle = True
# Map "CC: sipbtest espuser" => "starnine@mit.edu,espuser@mit.edu" # Map "CC: user1 user2" => "user1@mit.edu, user2@mit.edu"
huddle_recipients = [to_zulip_username(x.strip()) for x in huddle_recipients = [to_zulip_username(x.strip()) for x in
body.split("\n")[0][4:].split()] body.split("\n")[0][4:].split()]
if notice.sender not in huddle_recipients: if notice.sender not in huddle_recipients:

View File

@ -352,7 +352,7 @@ def compute_jabber_user_fullname(email):
def compute_mit_user_fullname(email): def compute_mit_user_fullname(email):
try: try:
# Input is either e.g. starnine@mit.edu or user|CROSSREALM.INVALID@mit.edu # Input is either e.g. username@mit.edu or user|CROSSREALM.INVALID@mit.edu
match_user = re.match(r'^([a-zA-Z0-9_.-]+)(\|.+)?@mit\.edu$', email.lower()) match_user = re.match(r'^([a-zA-Z0-9_.-]+)(\|.+)?@mit\.edu$', email.lower())
if match_user and match_user.group(2) is None: if match_user and match_user.group(2) is None:
answer = DNS.dnslookup( answer = DNS.dnslookup(