pycontw / pycon.tw

PyCon TW Proposal System & Backend Server
https://tw.pycon.org/prs
MIT License
94 stars 107 forks source link

[Email Feature] add relay smtp server configuration #1167

Open iknowright opened 4 months ago

iknowright commented 4 months ago

feat(smtp-relay): add relay smtp server configuration

Types of changes

Thanks for sending a pull request! Please fill in the following content to let us know better about this change. Please put an x in the box that applies

Description

目前 dev@pycon.tw 的寄信流程處於過渡期,目前希望透過 *@python.tw 取代 dev@pycon.tw 來寄信。 當中,Google Workspace (python.tw) 的架構需要在 server (staging vm + prod vm) 架設 SMTP server 來 route email message 至 google relay server。因此增加了一個 docker service 來達成此目的。

Steps to Test This Pull Request

Steps to reproduce the behavior (只適用於 production environment): 前置作業:

Server 端修改

  1. .env 需要新增 ALLOWED_SENDER_DOMAINS=python.tw
  2. 修改 .envEMAIL_URLsmtp://mailserver:587 (local service 會轉傳,不是直接透過 google smtp 了)
  3. docker-compose pull
  4. docker-compose up

Expected behavior

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.57%. Comparing base (dfabd13) to head (5a0a65c). Report is 2 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1167 +/- ## ======================================= Coverage 70.57% 70.57% ======================================= Files 85 85 Lines 3392 3392 ======================================= Hits 2394 2394 Misses 998 998 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.