SMTP SETUP GUIDE

Send Discourse email through SMTP with Ackuna

Discourse relies on email for account activation links, password resets, notifications and digests. If the SMTP settings are wrong, new members cannot activate their accounts. Point Discourse at the Ackuna relay and that mail goes out from your own domain.

Ackuna relay settings

Host
smtp.ackuna.com
Port
587
Security
STARTTLS (not SSL/TLS on connect)
Authentication
Yes, PLAIN or LOGIN
Username
YOUR_SMTP_USERNAME (starts with smtp_)
Password
YOUR_SMTP_PASSWORD (starts with sc_, shown once)
From address
any address on your verified domain, e.g. [email protected]

Before you start

You need three things from Ackuna. Each takes a few minutes, except the review in step 2.

  1. An Ackuna account. Create one for free; no card is needed.
  2. A verified sending domain. Add the domain your app sends from (for example yourdomain.com) under SMTP Relay, Domains in the console and publish the SPF, DKIM and DMARC records it shows you. The console checks them for you. A new sending domain is also reviewed by our team before it can send; that is not instant, and until it is approved the relay answers 452.
  3. An SMTP credential for that domain. Under SMTP Relay, Credentials, create one for the verified domain. You get a username (smtp_…) and a password (sc_…). The password is shown once, so paste it into Discourse straight away; if you lose it, rotate the credential.

The From address in Discourse must be on exactly that domain. A credential for yourdomain.com can send as [email protected], but not from a subdomain such as mail.yourdomain.com or from another domain.

The settings

A standard Discourse install keeps its settings in /var/discourse/containers/app.yml. In the env: section, set the SMTP lines like this:

  DISCOURSE_SMTP_ADDRESS: smtp.ackuna.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: YOUR_SMTP_USERNAME
  DISCOURSE_SMTP_PASSWORD: "YOUR_SMTP_PASSWORD"
  DISCOURSE_SMTP_ENABLE_START_TLS: true
  DISCOURSE_NOTIFICATION_EMAIL: [email protected]
  • DISCOURSE_SMTP_ENABLE_START_TLS is true by default; writing it out makes the intent clear.
  • Do not uncomment DISCOURSE_SMTP_FORCE_TLS. The sample file says it enables TLS on connect, "probably needed for using port 465", and the relay does not offer that.
  • Keep the password in quotes, as the sample file advises, in case it ever contains a #.
  • DISCOURSE_NOTIFICATION_EMAIL is the address Discourse sends from, so it must be on your verified domain.

Apply the change

Discourse reads app.yml only when the container is built, so rebuild it:

cd /var/discourse
./launcher rebuild app

Send a test email

Run ./discourse-doctor in /var/discourse: the Discourse troubleshooting guide says it checks several ways the mail configuration can be broken. Once you can log in as an admin, the Email page of the admin panel also has a Send test email button. Each message appears under SMTP Relay, Messages in the Ackuna console.

Common errors

Authentication failed (535)

The username or password is wrong, the credential was revoked, or its domain is no longer active. Copy both values again from the console, with no spaces around them. If you no longer have the password, rotate the credential and paste the new one.

TLS handshake error, "wrong version number" or a connection that hangs

The app is trying SSL/TLS on connect, which the relay does not offer. Use port 587 with STARTTLS: the connection starts in plain text and is upgraded before the login. If the connection times out instead, check that your host or firewall allows outgoing connections to port 587; some cloud providers block it on new servers until you ask them to lift the block.

Sender rejected (550)

The From address is not on the domain the credential was created for. Set the From address in Discourse to an address on that exact domain. The same code is used for a recipient on your suppression list, because an earlier message to them bounced or was marked as spam.

Temporarily rejected (452)

Either you have reached your daily or monthly limit, or the sending domain is still waiting for review. Both are temporary: a mail server retries later, and the console shows your usage. A message with more than 10 recipients is also refused with 452, and one over 10 MB with 552.

Mail that is accepted but lands in spam usually points at DNS, not SMTP. Run the Email DNS check on your domain, or the SPF, DKIM and DMARC checkers one by one.

Limits

  • The Free plan includes 3,000 relay emails a month and 100 a day, 1 SMTP credential and 1 sending domain. Paid plans and their limits are on the pricing page.
  • New accounts start on lower limits until Ackuna has reviewed them: at most 20 Agent Mail, 200 SMTP relay and 500 newsletter emails a day, whatever the plan allows. After the review the plan limits above apply.
  • Each new sending domain is reviewed before it can send.
  • One message can have up to 10 recipients and be up to 10 MB.
  • While we deploy an update, port 587 stays open and the relay holds the mail it accepts, then sends it when the update is done. A login it cannot check during that time gets a temporary 451; a retry goes through once the update is done.
FAQ

Discourse SMTP questions

Do I need to set DISCOURSE_SMTP_DOMAIN?

No. The sample file says to set the HELO/EHLO domain only if your provider requires it, and the relay does not.

Signed up but the activation email never came. What now?

Check SMTP Relay, Messages in the Ackuna console first. No message there means Discourse did not reach the relay: run ./discourse-doctor. A message that is there shows whether it was delivered, bounced or refused, and why.

Can I change the settings without a full rebuild?

The settings come from app.yml, so the container has to be recreated to see them. Discourse's troubleshooting guide also shows ./launcher destroy app followed by ./launcher start app for an SMTP-only change.

Start sending in minutes

All three services free every month: 2,500 newsletter, 3,000 relay and 3,000 Agent Mail emails. No credit card required - upgrade only when your volume does.