sgn icon indicating copy to clipboard operation
sgn copied to clipboard

Account confirmation emails not arriving for gmail users

Open bellerbrock opened this issue 2 years ago • 1 comments

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:

Screenshot from 2022-06-28 15-59-28

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

bellerbrock avatar Jun 30 '22 15:06 bellerbrock

If you go the gmail route, the setup that worked for us:

  1. Create a new gmail account
  2. Add 2FA to the account
  3. Create an app password to use for SMTP
  4. 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.

dwaring87 avatar Jul 01 '22 16:07 dwaring87

The above settings were implemented in sweetpotatobase and it works. To do: Need to update all the production server to this config.

lukasmueller avatar Sep 22 '22 16:09 lukasmueller