# הגדר דואר נכנס בהפצה ישירה לאתרים המארחים את עצמם עם Mail-Receiver

**URL:** https://meta.discourse.org/t/configure-direct-delivery-incoming-email-for-self-hosted-sites-with-mail-receiver/49487
**Category:** Self-Hosting
**Tags:** email, how-to, advanced-setup, mail-receiver
**Created:** [31 באוגוסט,‏ 2016,‏ 10:58am UTC](https://meta.discourse.org/t/configure-direct-delivery-incoming-email-for-self-hosted-sites-with-mail-receiver/49487 "2016-08-31T10:58:09Z")
**Posts on this page:** 1
**Showing post:** 482

<div class="post-metadata">

### Author: ![Carleas](https://avatars.discourse-cdn.com/v4/letter/c/57b2e6/32.png) [@Carleas](https://meta.discourse.org/u/Carleas)
#### Post date: [20 במרץ,‏ 2024,‏ 2:17pm UTC](https://meta.discourse.org/t/configure-direct-delivery-incoming-email-for-self-hosted-sites-with-mail-receiver/49487/482 "2024-03-20T14:17:19Z")

</div>

> [@Simon\_Manning](#):
>
> My suspicion is that your quote from the guide has thrown you off and actually everything is probably working correctly.

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.

> [@mpalmer](#):
>
> It is. With direct delivery, your outgoing mail provider doesn’t need get involved at all for incoming mail. Everything, be it a new topic, a reply, or a bounce, should all go straight to `mail-receiver` (and thence to Discourse for processing).

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](https://meta.discourse.org/t/discourse-notfound-error-when-click-email-type-field-on-admin-email-bounced/176011)

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?

---

_[View the full topic](https://meta.discourse.org/t/configure-direct-delivery-incoming-email-for-self-hosted-sites-with-mail-receiver/49487)._
