tl;dr: I can send mail via SMTP from my droplet, but not from Discourse running on my droplet.
This works:
./swaks --auth --server smtp.mailgun.org --au postmaster@discourse.particleman.org --ap [redacted] --to rrossney@gmail.com --h-Subject: "Hello from Discourse"--body 'This is coming via SMTP.'
resulting in an entry in my mailgun log and well, I also receive the email. When I send the authorization email from discourse, the logs appear to indicate success:
Started PUT "/finish-installation/resend-email" for 198.27.215.254 at 2018-03-24 01:32:13 +0000
Processing by FinishInstallationController#resend_email as HTML
Parameters: {"authenticity_token"=>[redacted]}
Rendering finish_installation/resend_email.html.erb within layouts/finish_installation
Rendered finish_installation/resend_email.html.erb within layouts/finish_installation (0.6ms)
Rendered common/_special_font_face.html.erb (0.2ms)
Rendered layouts/_head.html.erb (0.3ms)
Completed 200 OK in 27ms (Views: 2.6ms | ActiveRecord: 2.4ms)
and yet no email shows up in the mailgun logs, nor anywhere else. My app.yml contains:
DISCOURSE_SMTP_ADDRESS: smtp.mailgun.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: postmaster@discourse.particleman.org
DISCOURSE_SMTP_PASSWORD: [redacted]
…which seems straightforward enough. What have I overlooked?