1. What is the issue? Please be detailed.
I just did a new ODK Central fresh installation in Digital Ocean and the emails are not being sent to users while creating new accounts.
There is a message on the screen saying "Something went wrong: error code 504" and after using the docker compose logs --tail 50 service
command I found a Connection timeout error:
service-1 | Error: Connection timeout
service-1 | at SMTPConnection._formatError (/usr/odk/node_modules/nodemailer/lib/smtp-connection/index.js:798:19)
service-1 | at SMTPConnection._onError (/usr/odk/node_modules/nodemailer/lib/smtp-connection/index.js:784:20)
service-1 | at Timeout. (/usr/odk/node_modules/nodemailer/lib/smtp-connection/index.js:237:22)
service-1 | at listOnTimeout (node:internal/timers:594:17)
service-1 | at process.processTimers (node:internal/timers:529:7) {
service-1 | code: 'ETIMEDOUT',
service-1 | command: 'CONN'
service-1 | }
I'm using a custom mail server configuration following the documentation and it's pointing to a Mailgun service account with a valid domain and authentication credentials (those setting are correct and still working on another old ODK Central installation that I'm running at Digital Ocean).
2. What steps can we take to reproduce this issue?
It's happening to any new installation of ODK Central in Digital Ocean. I did it 2 times and got the same end result.
3. What have you tried to fix the issue?
Yes, and I'm kind a following up here what I've found:
Digital Ocean is blocking SMTP transport ports by default to all new droplets, there is a FAQ about this: https://docs.digitalocean.com/support/why-is-smtp-blocked/
Mailgun documentation suggests the use of a simple tool called swaks that can be very handy to test SMTP transport from the command line, details here: https://documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/#send-via-smtp
I opened a support ticket at Digital Ocean to request the exclusion of my server's IP addresses from their firewall blocking rules.
Hope this helps everyone on the same situation
4. Upload any forms or screenshots you can share publicly below.