-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
dex-worker: Log warning or fatal exit if -email-from is not set #389
Comments
Better yet make this a line in the emailer config `"from": "your.mail@domain.com"`` (put something in the example so its clear you need to fill it). Remove the cmdline option and fatal out if "from" is empty. |
Yes let's do this. It's really weird to have some configuration in the command line flags and others from the config file. Is there a reasonable value we could default to? What were emails as being sent before this change? |
Good question, I don't recall what the sender was with 0.1. As I'm using gmail, I would assume that the from field is not mandatory and google will figure it out if sent as blank? Not sure if you can make this generalization for all smtp services? If the golang email library needs the field to be filled, that's another story then. |
cc @xaka |
I just spent a good amount of time figuring out why emails are not firing. I recently migrated from 0.1 or something to 0.3 which was painless. I dont think this
-email-from
was needed in 0.1, don't know when it was introduced. It was then reported to me that the email verification etc. emails were not working.Anyhow, seemingly no emails are sent if this cmd line flag is not set, even if you specify a valid email config file. I assumed it would be enough as the username is the same as the email address, but I suppose this cant be assumed with all smtp servers (?!).
No warnings during startup. I tried the reset password functionality that is when I saw
ERROR: error sending password reset email gomail: could not send email 1: mail: no address:
Not sure where this is coming from but started looking at the cmd line params after that and once
-email-from
was set it started working.Either fatal exit the app or print a warning/error to log if a valid (non fake type) emailer config is provided but the
-email-from
is not defined.The cmd line -h documentation should probably also mention its mandatory if you want emails to work.
The text was updated successfully, but these errors were encountered: