# 使用邮件回复功能时，Discourse 在“发件人”头字段中设置“回复到”值

**URL:** <https://meta.discourse.org/t/discourse-setting-reply-to-value-in-from-header-field-when-using-reply-by-email-feature/103303>\
**Category:** Feature\
**Created:** [2018 年12 月 2 日 15:40 UTC](https://meta.discourse.org/t/discourse-setting-reply-to-value-in-from-header-field-when-using-reply-by-email-feature/103303 "2018-12-02T15:40:39Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)\
发布日期： [2018 年12 月 2 日 15:40 UTC](https://meta.discourse.org/t/discourse-setting-reply-to-value-in-from-header-field-when-using-reply-by-email-feature/103303/1 "2018-12-02T15:40:39Z")

</div>

This issue was also reported on different topic related to setting up email replies. As suggested by @mpalmer I’m creating a new topic.

The other users who reported this issue on this topic:  
[https://meta.discourse.org/t/set-up-reply-via-email-support/14003/96](https://meta.discourse.org/t/set-up-reply-via-email-support/14003/96)

I’ve searched the forum and can’t seem to find an answer so after debugging this using a hMailServer SMTP server I’m beginning to think this may be a bug. This issue is causing issues like the SMTP server not DKIM signing the message since the sender domain doesn’t match the `from` header and also being flagged as potential spam by [www.mail-tester.com](http://www.mail-tester.com) for the same reason.

So I did some more testing to see what’s going on. I did 2 tests with the same setup from the same network and both are setup with the same SMTP server name, username/password, port and authentication. One machine running outlook and another discourse, sent a test eMail to the same email address from discourse and from outlook.

In outlook I set the “reply-to” feature similar to what discourse is is supposed to set for a reply to address. (using gmail here for the reply-to)

I looked at the SMTP server records and I noticed that the `from` header from outlook was set correctly.

> “RECEIVED: MAIL FROM: [discussion@xxxx.com](mailto:discussion@xxxx.com)”

However the logs from the discourse transaction shows this for the `from` header:

> “RECEIVED: MAIL FROM: [my.discussion+verp-eb90be8c2b93e18896c910d4fe2cdc05@gmail.com](mailto:my.discussion+verp-eb90be8c2b93e18896c910d4fe2cdc05@gmail.com)”

That’s the root cause why receivers are flagging as spam and why the SMTP server won’t DKIM sign the message sent from discourse since the from address doesn’t match the senders domain.

Why is discourse setting the `from` flag with the reply-to address?

---

_[View the full topic](https://meta.discourse.org/t/discourse-setting-reply-to-value-in-from-header-field-when-using-reply-by-email-feature/103303)._
