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
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 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”
However the logs from the discourse transaction shows this for the from
header:
“RECEIVED: MAIL FROM: 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?