Set up Reply via Email Support ✉

(RBoy) #95

How exactly are you going to get Discourse to poll both the new and the old mailboxes? Or are you going to forward emails from the old mailbox to the new mailbox?

(Raghav) #96

I have two separate email addresses for outgoing and incoming emails. Outgoing email works when I don’t have the reply by email feature enabled. But, when I enable reply by email, the outgoing email notification fails. When I did a tcpdump, I found that the reply by email address (reply+%{reply_key} is set in the MAIL FROM header instead of being in the reply-to header field. I tested reply by email with an email address without the ‘+’ and it successfully is set as the Reply-To header. This might be something to do with plus addressing but I am unsure what exactly is happening. We use exchange as our email provider but we have an MTA that provides plus addressing support. So, I was able to configure categories with an incoming email address as and that worked without an issue. So, I don’t know why the reply by email address gets set as the FROM header when there is plus addressing involved. Anyone got an idea?

(Michael Howell) #97

Do you mean that the reply address is set as “From” coming out of your MTA, or that it is set as “From” coming out of Discourse?

(Raghav) #98

MAIL FROM is issued by the mail client which is Discourse in this case. But, the weird thing is when I have something like (, it does correctly place itself in the Reply-To header and the MAIL FROM is also correctly set with the actual outgoing email address.

(Raghav) #99

Any one have come across this issue? I am still stuck with no luck.

(Matt Palmer) #100

You might get an answer if you post in a topic about sending e-mail, rather than receiving it. Or post a new topic.

(Jason Costanza) #101

I’m trying to get this working but I’m assuming I’m missing something hopefully simple. But translating example values into my integration apparently isn’t going so well for me. Or something.

I’ve enabled lower security apps in gmail, and POP settings. Discourse log isn’t registering anything, and sent mails in the admin settings shows nothing also. So I’m probably doing something really dumb and simple, but I don’t know much about these particular bits of tech.

Log shows this:

/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/logster-1.2.9/lib/logster/logger.rb:93:in `add_with_opts'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/logster-1.2.9/lib/logster/logger.rb:50:in `add'
/usr/local/lib/ruby/2.4.0/logger.rb:534:in `warn'
/var/www/discourse/lib/email/processor.rb:116:in `log_email_process_failure'
/var/www/discourse/lib/email/processor.rb:25:in `rescue in process!'
/var/www/discourse/lib/email/processor.rb:15:in `process!'
/var/www/discourse/lib/email/processor.rb:11:in `process!'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:25:in `process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:43:in `block (2 levels) in poll_pop3'
/usr/local/lib/ruby/2.4.0/net/pop.rb:689:in `block in delete_all'
/usr/local/lib/ruby/2.4.0/net/pop.rb:688:in `each'
/usr/local/lib/ruby/2.4.0/net/pop.rb:688:in `delete_all'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:42:in `block in poll_pop3'
/usr/local/lib/ruby/2.4.0/net/pop.rb:532:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:41:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:16:in `execute'
/var/www/discourse/app/jobs/base.rb:134:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rails_multisite-2.0.2/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/app/jobs/base.rb:129:in `block in perform'
/var/www/discourse/app/jobs/base.rb:125:in `each'
/var/www/discourse/app/jobs/base.rb:125:in `perform'
/var/www/discourse/app/jobs/base.rb:180:in `perform'
/var/www/discourse/lib/scheduler/manager.rb:91:in `process_queue'
/var/www/discourse/lib/scheduler/manager.rb:37:in `block in initialize'

(Jason Costanza) #102

Wanted to update again, I got my issue fixed. A friend helped me point out I had my reply by email address set incorrectly. Translating the example values into my implementation was the issue.

(Kane York) #103

This guide should probably be revised to call out Direct Delivery as a suggested method.

(Jeff Atwood) #104

An extremely difficult, advanced method, perhaps…

(Christoph) #105

I found it easier to set up direct mail delivery than the steps above. But maybe that was because by the time I found out about it I had gotten more experienced with discourse.

(Kane York) #106

And I was primarily thinking about the part where Google really doesn’t want you doing this, as evidenced by the name of the “Allow access from insecure apps” setting.
And they might decide to make this harder in the future.

because “your email is your identity” →implies consumer accounts shouldn’t be delivering all messages they receive to an automated system in VPS IP ranges

(Chris Mao) #107

Dear Jeff,

I am beginner for Discourse, and I am have one question here about how to set up Reply via Email. I really appreciate if you can give me some feedback.

The detail information as below.
first of all, I configured the SMTP information in app.yml file:


I set up the notification email same as DISCOURSE_SMTP_USER_NAME, and then I go to the email page, and SEND TEST MAIL. It’s work as normally.

second, I set up the “Reply via Email” function one by one as you saying. If I fill certain email address in the ** reply by email address** field, such as disc.reply+%{reply_key} The test mail CANNOT be send successfully, and I got the “[Sender] 553 Mail from must equal authorized user” error.Where did i get it wrong?

By the way, if I leave the field blank, I can sent the test mail. meanwhile, the interesting things happened. I can manually reply the email to the destination address, such as disc.reply+t/this-is-first-post/53/ and the system also automatically generated the reply.


Looking forward you reply.

(Kane York) #108

Did you try disc_reply+%{reply_key} ?

If that doesn’t work, try asking your mail administrators to enable VERP for this sender account.

(Chris Mao) #109

so, you mean the reply by email address should be same with the SMTP_USER_NAME in app.yml file, right?

(Chris Mao) #110

actually, I had been try this one, still get the error with “553 Mail from must equal authorized user” message.

(sepideh Javdani) #111

Can you specify more? I have same issue but not able to fix?