sgn
sgn copied to clipboard
Account confirmation emails not arriving for gmail users
Expected Behavior
Bert shared a list of users with me that tried to register on sweetpotatobase during a workshop last week and never received account confirmations, they all registered with gmail.com accounts
When I ssh to sweetpotatobase.org and run mail -s "Test mail" [email protected] < /dev/null
or mail -s "Test mail" [email protected] < /dev/null
the messages arrive, but when I try mail -s "Test mail" [email protected] < /dev/null
it does not come through, not even in spam.
Same thing for confirmation emails if I try creating a dummy account. Here are the details of a message that does arrive for a .edu account:
Maybe gmail rejects messages because of the DMARC: FAIL
? Gmail has some info about DMARC https://support.google.com/a/answer/2466580?hl=en&ref_topic=2759254
We could also, per David's suggestion, try creating a [email protected] account and use it to send confirmation emails.
For Bugs:
Environment
Steps to Reproduce
If you go the gmail route, the setup that worked for us:
- Create a new gmail account
- Add 2FA to the account
- Create an app password to use for SMTP
- Modify the sgn_local.conf file:
smtp_server smtp.gmail.com
smtp_port 25
smtp_login [email protected]
smtp_pass app_password
smtp_from
smtp_layer tls
smtp_auth AUTO
In my experience, even if you have all of the email settings (SPF, DKIM keys, etc) properly set, some email providers will still block or mark your email as spam if the mail isn't coming from a set of IP ranges they recognize.
The above settings were implemented in sweetpotatobase and it works. To do: Need to update all the production server to this config.