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