Sending emails with SMTP credentials using Amazon SES works… But not from Discourse

I’ve configured Amazon SES.
I’m out of the sandbox, which means I can send emails to unverified addresses.
From Amazon SES doc:

When your account is out of the sandbox, you can send email to any recipient, regardless of whether the recipient’s address or domain is verified. However, you still have to verify all identities that you use as “From”, “Source”, “Sender”, or “Return-Path” addresses…

I’ve also configured my SMTP credentials.

Sending a test email to an unverified recipient email works from the Amazon S3 dashboard or any other SMTP test tool.

However, it doesn’t work from Discourse.


  DISCOURSE_SMTP_PASSWORD: "*************************************"
  #DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)
  DISCOURSE_SMTP_DOMAIN: # (address to send notifications from)
  DISCOURSE_NOTIFICATION_EMAIL: # (address to send notifications from)

reply by email settings:

When I send a test email from Discourse, the mail is skipped with this error message:

554 Message rejected: Email address is not verified. The following identities failed the check in region EU-WEST-3:

And I have of course rebuilt my app after changing app.yml.

Any idea why this issue occurs, and how to resolve it?

That error message suggests that you need to create an identity for and verify it. Note that you don’t need to verify the label (+verp-...) as all labels will be accepted when the address is verified without a label.

The reason for this is that the reply by email address is used as a Return-Path address, one of the types your quote highlights as needing to be verified.

I’m not sure why sending in the other ways works but I think your Amazon dashboard and SMTP test tool tests probably worked because they were sending to your reply by email address, rather than using it as the Reply-To/Return-Path address as Discourse does.

The documentation on identities is here:

1 Like

Ah, yes, as described here:

Which I didn’t understand at first. Let’s try adding my gmail address as a verified address in SES.

1 Like

AFAIK you can’t use ±addresses on SES. But I’m using SES everyday via Discourse.


I’ve verified and Discourse can send emails to users. The reply by email feature also works.
I’ll see in the next days if I have any trouble.

Can you clarify a bit more? In regard to what I just wrote (things seem to work). :slight_smile:

1 Like

There is two different things:

  • SES can’t use + -addresses with incoming or outcoming traffic (I really can’t remember right term for + form)
  • I’m sendind emails all the time from Discourse through SES

When I tried to use create/reply by email I needed to use gmail because of that.

Is this relevant to you… not a slightiest idea :man_facepalming:

1 Like

Oh, okay, thanks for the clarification. I don’t use ± addresses for SES, so I don’t think it’s relevant in my case. :slight_smile:

Amazon call them labels, assuming you’re referring to user+label@domain addresses, I don’t remember if that’s the email term or just Amazon’s term. Are you sure these are unsupported? They are pretty commonly used by users.

The only thing I can find in the documentation is that the SMTPUTF8 extension is unsupported, limiting the local part (before @) to 7-bit ASCII characters. That includes the + character.

No, you don’t, but +verp… acts as such. Or am I totally wrong?

Oh well, my replies can be a bit off since I don’t understand much email-related things.

My reply-by-email setting is indeed a gmail address that uses “+” and stuff.

If the reply to by email setting is off, then Discourse email sending works (if I remember well).

If the reply to by email setting is on, and if I don’t verify the gmail address in SES, then Discourse won’t send any emails, whether they have a gmail reply-to address or not (for example, the test email, or a digest email don’t have the gmail reply-to address), and throw a 554 Message rejected: Email address is not verified error.

If I verify the gmail address on SES, then all the emails sent by Discourse seem to work, whether they have a gmail reply-to address or not.

Of course, I’d like to know a bit more about how all these things work, but as long as it works… That’s my primary concern. :smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.