Hello everyone,
I’ve been trying to configure outbound mail on a self-hosted Discourse installation but so far no luck. Even with Namecheap support involved, we couldn’t get it working. Hoping someone here can point out what I’m missing.
Setup
-
Hosting: DigitalOcean droplet, Discourse installed via the official Docker method (
/var/discourse). -
Domain: Managed via Cloudflare (proxied A records for the site, DNS-only for MX/mail records).
-
Mail provider: Namecheap Private Email.
-
Discourse version: Latest tests-passed branch.
What works
-
I can receive email at my
hello@domain.cominbox without issues. -
MX, SPF, DKIM, and DMARC DNS records are set and validated.
-
Incoming mail via Gmail →
hello@domain.comworks.
What fails
-
Outgoing (activation emails, test emails from Discourse) never arrive.
-
Namecheap support confirmed my credentials and settings are correct, but couldn’t explain why it fails from the server.
Current app.yml config
DISCOURSE_SMTP_ADDRESS: mail dot privateemail dot com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: hello at domain dot com
DISCOURSE_SMTP_PASSWORD: “PASSWORD”
DISCOURSE_SMTP_ENABLE_START_TLS: true
DISCOURSE_SMTP_DOMAIN: domain dot com
DISCOURSE_NOTIFICATION_EMAIL: hello at domain dot com DISCOURSE_SMTP_AUTHENTICATION: login
I also tried port 465 with:
DISCOURSE_SMTP_PORT: 465
DISCOURSE_SMTP_ENABLE_START_TLS: false
DISCOURSE_SMTP_SSL: true
Debug steps taken
-
Verified DNS records in Cloudflare are correct (MX, SPF, DKIM, DMARC).
-
Confirmed that ports 587 and 465 are not blocked locally by UFW/iptables.
-
Tried forcing IPv4 preference in
/etc/gai.conf. -
Tested with
ncandopenssl→ still timing out. -
Even Namecheap’s own instructions (587 STARTTLS or 465 SSL) result in failure from the server.
Question
Has anyone successfully configured Namecheap Private Email with Discourse SMTP?
-
Is there a known issue with DigitalOcean droplets reaching
mail.privateemail.comon 587/465? -
Should I give up on Namecheap SMTP and use a transactional mail service (Postmark, Mailgun, SendGrid) instead?
-
Is there a special
app.ymlflag needed for this provider?
Thanks in advance for any guidance. I’ve hit a wall with this setup.