Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Email Feature] add relay smtp server configuration #1167

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

changchaishi
Copy link
Contributor

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

  • Bugfix
  • New feature
  • Refactoring
  • Breaking change (any change that would cause existing functionality to not work as expected)
  • Documentation Update
  • Other (please describe)

Description

目前 [email protected] 的寄信流程處於過渡期,目前希望透過 *@python.tw 取代 [email protected] 來寄信。
當中,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):
前置作業:

  • workspace 系統管理員依照 Google Admin Console 設定 輸入
  • Allowed Senders - Only addresses in my domains
  • Authentication - IP list (輸入 prod vm + staging vm 的 public IP)
  • TLS checked

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

  • 可以使用任意 @python.tw address 當作 sender 發信。

@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@changchaishi changchaishi self-assigned this Feb 24, 2024
@SivanYeh SivanYeh self-requested a review March 25, 2024 06:04
@SivanYeh SivanYeh linked an issue Mar 25, 2024 that may be closed by this pull request
@SivanYeh SivanYeh requested a review from josix May 18, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

寄信功能確認(e.g. 忘記密碼)
2 participants