-
Notifications
You must be signed in to change notification settings - Fork 15
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
Allow custom email sender #695
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
config/runtime.exs
Outdated
@@ -102,6 +102,7 @@ if config_env() == :prod do | |||
|
|||
config :trento, :alerting, | |||
enabled: System.get_env("ENABLE_ALERTING", "false") == "true", | |||
sender: System.get_env("ALERT_SENDER") || "[email protected]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System.get_env("ALERT_SENDER", "[email protected]")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right 😄
Changed also the recipient to
System.get_env("ALERT_RECIPIENT", "[email protected]")
f847d74
to
1523afd
Compare
1523afd
to
4b65214
Compare
Since we're touching this code, do you think it could be feasible to make both recipient and sender follow the customary mailbox format |
Not an expert here, but I am wondering whether that could open to some sort of security issue where bad things could be injected 🤔 It might be interesting allowing that customization, yet I believe the added value is not enough compared to the security risks, if any, and the validation added complexity. |
I was expecting the validation to be done by Swoosh, but after I looked it up it seems it doesn't support mailbox headers, so I guess the answer to my question is "no, it's not easily feasible". I would never want you to re-implement RFC5322 email header validation, that's what frameworks should do for us. 😉 |
Allow the user to provide a custom email sender for alerting.
Relates to trento-project/helm-charts#31