# 关于 / 回复 / 反弹邮件问题

**URL:** https://meta.discourse.org/t/from-reply-bounce-email-issue/44022
**Category:** Support
**Created:** [2016年五月11日 00:15 UTC](https://meta.discourse.org/t/from-reply-bounce-email-issue/44022 "2016-05-11T00:15:58Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![lrossouw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lrossouw/32/121275_2.png) [@lrossouw](https://meta.discourse.org/u/lrossouw)
#### Post date: [2016年五月11日 00:15 UTC](https://meta.discourse.org/t/from-reply-bounce-email-issue/44022/1 "2016-05-11T00:15:58Z")

</div>

I’m not sure where this issue arises but I think this commit is causing me some hassles:  
[https://github.com/discourse/discourse/commit/84d4ebd9108cbe6c2d948401013ef869160fe666](https://github.com/discourse/discourse/commit/84d4ebd9108cbe6c2d948401013ef869160fe666)

What my site config has is an smtp account with [noreply@mysite.com](mailto:noreply@mysite.com)  
My reply address in settings is [forum@mysite.com](mailto:forum@mysite.com)

This was working correctly and people were able to reply to emails.

When I upgraded I get errors on mail being rejected as the from address is not being found in aliases, presumably because email is being sent by user [noreply@mysite.com](mailto:noreply@mysite.com) but with envelope from forum+verp{key}@mysite.com.

````plaintext
May 11 01:45:32 mail postfix/submission/smtpd[621]: NOQUEUE: reject: RCPT from unknown[x.x.x.x]: 451 4.3.0 <forum+verp-2b5431831091aec1bc4e1ba25b4c26cc@mysite.com>: Temporary lookup failure; from=<forum+verp-2b5431831091aec1bc4e1ba25b4c26cc@mysite.com> to=<some_user@gmail.com> proto=ESMTP helo=<localhost.localdomain>```

````

How do I resolve this?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2016年五月11日 00:19 UTC](https://meta.discourse.org/t/from-reply-bounce-email-issue/44022/2 "2016-05-11T00:19:04Z")

</div>

Sure @zogstrip can have a look

---

<div class="post-metadata">

### Author: ![lrossouw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lrossouw/32/121275_2.png) [@lrossouw](https://meta.discourse.org/u/lrossouw)
#### Post date: [2016年五月11日 00:21 UTC](https://meta.discourse.org/t/from-reply-bounce-email-issue/44022/3 "2016-05-11T00:21:52Z")

</div>

Thanks this is the bit of code:

 ![](https://global.discourse-cdn.com/meta/original/3X/3/6/362b6c85981966ed5c22aedc9779470912f5f545.png)  
I had not configured email bounce settings before.

I can confirm deactivating reply by email feature (by tick box and removing the relevant email) allows emails to be sent again.

---

<div class="post-metadata">

### Author: ![lrossouw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lrossouw/32/121275_2.png) [@lrossouw](https://meta.discourse.org/u/lrossouw)
#### Post date: [2016年五月11日 13:20 UTC](https://meta.discourse.org/t/from-reply-bounce-email-issue/44022/4 "2016-05-11T13:20:46Z")

</div>

This is what I think is happening. Discourse authenticates against the mail server using user and pass for [noreply@mysite.com](mailto:noreply@mysite.com) but then tries to send mail from forum+verp{key}@mysite.com.

I think my mail server is correctly blocking this as it should not allow people to send emails from addresses they don’t own.

I could change the sending user to [forum@mysite.com](mailto:forum@mysite.com) but I’m not sure that my postfix mail server is clever enough to recognise [forum+something@mysite.com](mailto:forum+something@mysite.com) as a valid mail from for [forum@mysite.com](mailto:forum@mysite.com). It certainly delivers emails like this but not sure if allows messing with the from address in this way. I can test this.

Assuming this works then the new bounce functionality will only work if:  
the smtp account in the site config = notification email in site settings = reply by email address in site settings.

Or am I missing something?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2016年五月11日 14:06 UTC](https://meta.discourse.org/t/from-reply-bounce-email-issue/44022/5 "2016-05-11T14:06:57Z")

</div>

> [@lrossouw](#):
>
> I could change the sending user to [forum@mysite.com](mailto:forum@mysite.com) but I’m not sure that my postfix mail server is clever enough to recognise [forum+something@mysite.com](mailto:forum+something@mysite.com) as a valid mail from for [forum@mysite.com](mailto:forum@mysite.com). It certainly delivers emails like this but not sure if allows messing with the from address in this way. I can test this.

I would ❤ if you could test it.

---

<div class="post-metadata">

### Author: ![lrossouw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lrossouw/32/121275_2.png) [@lrossouw](https://meta.discourse.org/u/lrossouw)
#### Post date: [2016年五月11日 14:32 UTC](https://meta.discourse.org/t/from-reply-bounce-email-issue/44022/6 "2016-05-11T14:32:37Z")

</div>

Well I would test it first directly against the mail server by connecting to mail server port and trying to submit an email like that “per hand”. I will try to get to it tonight but may only get to it tomorrow night.

---

<div class="post-metadata">

### Author: ![lrossouw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lrossouw/32/121275_2.png) [@lrossouw](https://meta.discourse.org/u/lrossouw)
#### Post date: [2016年五月11日 19:15 UTC](https://meta.discourse.org/t/from-reply-bounce-email-issue/44022/7 "2016-05-11T19:15:08Z")

</div>

I tested it now.

postfix can figure out if you login with user forum@example on smtpd you are allowed to send mail from [forum+something@example.com](mailto:forum+something@example.com). This works. You have to have the “recipient\_delimiter = +” setting in your postifx conf (which I had).

I then changed my site email smtp config to user to [forum@mysite.com](mailto:forum@mysite.com) with the relevant pass.  
I changed the notification email to [forum@mysite.com](mailto:forum@mysite.com) (under required setting).  
I changed the reply email to forum+%{reply\_key}@mysite.com.

All seems to be working again.

Basically exactly as I thought. You kind to have all these now be the same for email to work properly otherwise you end in trouble.

Probably should add that to the checking for these settings so it will work.

---

<div class="post-metadata">

### Author: ![lrossouw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lrossouw/32/121275_2.png) [@lrossouw](https://meta.discourse.org/u/lrossouw)
#### Post date: [2016年五月20日 13:53 UTC](https://meta.discourse.org/t/from-reply-bounce-email-issue/44022/8 "2016-05-20T13:53:07Z")

</div>

Just a follow up from this because:  
smtp account = notification email = reply email I see the following:

 ![](https://global.discourse-cdn.com/meta/original/3X/e/5/e5355e00920acf3102beee98c1e258602cb46a6b.png)

All the bounced replies are going to the rejected queue for forum replies. This is a blessing and a curse. A blessing because I can see the bounce reasons to diagnose email issues. A curse because the rejected queue is supposed to be for rejected attempts at reply.

It also results in a 👻 user being created:

 ![](https://global.discourse-cdn.com/meta/original/3X/e/1/e173551ea8724ba5d4254c9e35dbc6b4d4138cb5.png)

I prefer if the bounced email list also contains a box to view the bounces. These should be separate from the failed reply by email emails where the bounced emails are now also landing.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2016年五月20日 23:15 UTC](https://meta.discourse.org/t/from-reply-bounce-email-issue/44022/9 "2016-05-20T23:15:33Z")

</div>

Perhaps @zogstrip can advise here.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2016年五月23日 19:42 UTC](https://meta.discourse.org/t/from-reply-bounce-email-issue/44022/10 "2016-05-23T19:42:58Z")

</div>

I agree, here’s a fix 😉

> <https://github.com/discourse/discourse/commit/b7e29eebe5bdf4aa2c7b888ae486d00423a7d227>

As for the 👻 user (we call them “`staged users`”), that’s standard procedure for all incoming emails.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2024年六月8日 12:45 UTC](https://meta.discourse.org/t/from-reply-bounce-email-issue/44022/11 "2024-06-08T12:45:40Z")

</div>

此主题已自动关闭 2950 天。不再允许回复。
