zulip/zulip

Extend email mirror to support admins@realm.zulip.example.com forwarding addresses

Open

#6,932 建立於 2017年10月9日

在 GitHub 查看
 (7 留言) (0 反應) (0 負責人)Python (19,672 star) (7,339 fork)batch import
area: notifications (other)help wantedpriority: high

描述

For Zulip's "your account has been deactivated" notices, and maybe a few other places, we'd like to provide a way to contact the organization administrators for a given Zulip organization/realm on a multi-realm server (for a single-realm server, the existing ZULIP_ADMINSTRATOR contact is great).

The right way to do this probably involves using the "email mirror" service (zerver/lib/email_mirror.py), since it means we already can accept email on the Zulip server and process it with code. Here's some notes on a possible design:

  • process_message is the main high-level function; we'd add an additional case to process_missed_message and process_stream_message, process_realm_admin_email.
  • This new case should probably just forward the email on to the realm administrators, with possibly a bit of extra logic around SMTP headers (specifically, the Zulip server may only be able to actually send email from ZULIP_FROM_ADDRESS, so we'll probably want to effectively "forward" the original email, replacing the sender and thus presumably also adding a heading section at the top of the email providing information on the actual sender).
  • As part of working on this, it might be a good idea to try to build greater test coverage on zerver/lib/email_mirror.py, since that system doesn't have good tests, and we'll likely be doing some refactoring in there.

貢獻者指南