Configure direct-delivery incoming email for self-hosted sites with Mail-Receiver

You were correct, setting up an email for a category and sending email there worked as expected, so I was just beating my head against wall because the rejections were silent.

I’m glad I know now, and I hope the guide is updated, though personally I’d prefer if it worked as the guide describes. For example, if users are trying to send email to some address and it’s failing, might help me either let them know or realize there’s demand for communicating with a category or group by email. Seems like without that, there’s no easy way to see those emails.

This still isn’t working as expected. I got the webhooks working, so I can see several bounces, but I know they are from Mailgun webhooks because they have the issue described here: “Discourse::NotFound” error when click “Email Type” field on admin/email/bounced

I don’t really understand how Mailgun is getting the bounces in the first place, since I don’t have any MX records pointing at their servers, I assume they’re setting a return path as they send the outgoing email?

And I see the bounces in mail-receiver logs, but they aren’t getting to app. It looks like they’re getting silently rejected. Here’s a line in the logs that I can connect with a bounce received through the webhooks:

NOQUEUE: reject: RCPT from mail-[id1].outbound.protection.outlook.com[XX.XX.XX.XX]: 450 4.7.1 <bounce+[id2]-[email]=[address].com@www.[mydomain].com>: Recipient address rejected: Internal error, API request failed; from=<> to=<bounce+[id#]-[email]=[address].com@www.[mydomain].com> proto=ESMTP helo=<[id3].outbound.protection.outlook.com>

Do I need to add bounce+{%something}@www.mydomain.com as a whitelisted address somewhere so that they get through?

2 Likes