Set up Reply via Email Support ✉


(Régis Hanol) #68

This one has nothing to do with the BadDestinationAddress error.

It’s either that one, or the incoming email address you set on a group.


(Bruce Becker) #69

Hi @martin_hewitt
I too am using mailgun, for similar reasons. I too had this initial reaction :

… however, Mailgun offers to store and notify messages by specifying a callback url. I was wondering whether perhaps this would not be a better / more “discourse-native” way to use mailgun. If one had a callback url which could match the incoming message to the topic and post to it, wouldn’t that negate the need for gmail altogether ?


(Robert) #70

There is one. I pipe the mails from STDIN to the forum using curl. It looks like this:

curl -4 --fail -sS -X POST --data-urlencode email@- "https://discourse-forum.org/admin/email/handle_mail?api_key=HERE_FORUM_API_KEY&api_username=system"

To make it work with mailgun, it must be a HTTP POST, and the mail must be in the field ‘email’. If this is not the case, you can either try to add a route to Discourse that can handle the format of mailgun, or you run a separate server that converts the mailgun format.


(Mitchell Krog) #71

Works 100% running it through my postfix server. Thanks for a simple guide to this.


(Tiago Forte) #72

I can’t seem to find any of these settings. I’m looking at both the Emails tab across the top of the Settings page, and the Email section along the left that’s revealed when I click the Settings tab:


(Jeff Atwood) #73

They are there. If you are on our hosting they are hidden as we handle all that.


(Geoff Bowers) #74

What is the purpose of the alternative reply by email addresses option?


(Jeff Atwood) #75

No idea! Anyone else know?


(Sam Saffron) #76

I assume this is for added flexibility, but can not thing of the particular use case off the top of my head. For incoming “group” and incoming “category” emails the use case is much easier to explain.


(Jay Pfaffman) #77

You might change the address for some reason and not want the old one(s) to break. The real question is why reply by email address allows just one address and alternative.. allows a list. If reply by email address were a list, there’d be no reason for the other.


(Régis Hanol) #79

This was indeed done to support changing email addresses. At the time it was easier to add another list but I agree, merging the two settings makes much more sense. Added to my :pencil:.


(Matt Palmer) #80

No, I think you still want two separate settings. The reply by email address is the template that will be used to generate the return address on outgoing mail, and alternative reply by email addresses is for any other addresses you want recognised as reply addresses for incoming e-mail. As @pfaffman said, you use the alternatives list when you change addresses for some reason, and don’t want new replies people make just after the switch (which will go to the old address, the one that was in the mail they received) to be thrown out.


(Jeff Atwood) #81

Can you provide some examples? I am not quite following this


(Jay Pfaffman) #82

(emphasis added) Doh! So that’s why there are two. :slight_smile:

Fooled you, @zogstrip!

I used to get mail sent to someaddress@oldforum.com. Now I want to use anotheraddress@newforum.com. I don’t messages sent in reply to those old emails with the old address to bounce or otherwise not work.


(Régis Hanol) #83

Oh my… :blush:

Hopefully @mpalmer is here to save us all! :heart_eyes:

Maybe we should change the name of that setting so that it’s not confusing?


(Geoff Bowers) #85

I recently had a mail change.

Does that mean i have to:

  • update that field with the old address template
  • forward all mail from the old account to the new account so it gets polled

Problem I have is forwarding email from the old account gets rejected once it passes through the new account with:

Something has gone wrong. Perhaps this topic was closed or deleted while you were looking at it?

An excerpt of the headers on the rejected email include:

From: Lucee Lang <lucee.lang.discourse@gmail.com>
To: hello@lucee.org
Message-ID: <CANfgq1VLZfK5P+hx7=LS3UJfY5QEkmY4v7ttZ4-cgJThYBHJAA@mail.gmail.com>
In-Reply-To: <CAOnx9sCiAX6W6OAgyL-LTcDpAryS_6JR1ipBBPM=5MBB0zBbvw@mail.gmail.com>
References: <topic/401@lang.lucee.org>
 <topic/401/1678@lang.lucee.org>
 <topic/401/1680@lang.lucee.org>
 <CAOnx9sCiAX6W6OAgyL-LTcDpAryS_6JR1ipBBPM=5MBB0zBbvw@mail.gmail.com>
Subject: Fwd: [lucee-lang] LAS Board: 2017 Week 08 Minutes

Where the following changes were made:

Has the change in domain for the forum basically kaiboshed the effort to change the email account?


Best practice for reply by email address
(RBoy) #91

My email hosting service doesn’t support RFC 5233 hence any email sent is returned as not delivered due to non existent mailbox (the name+id, it doesn’t recognize the +) , is there any way to use the eMail reply without %{reply_key}, so that it would only use reply@domain.com and then use something within the email subject or body itself to identify the reply_key? I’m trying to avoid using GMail

@sam


(Dean Taylor) #92

Probably best to take a peek at this, it is an alternative to collecting mail from a POP3 account:


(Matt Palmer) #93

There’s no way to avoid using the reply key in the To address, if you want replies to actually be associated with the topic they’re replying to. I’d recommend choosing a different, not-awful, e-mail service provider, or using direct delivery, as @DeanMarkTaylor suggested.


(RBoy) #94

@codinghorror Jeff, in your example here, correct me if I’m wrong, just because the user created a username on gmail called replies@example.com (first of all GMail not longer allows you to create @domain.com unless you’re a G Suite account, it’s always something@gmail.com) doesn’t mean the reply to address will be replies@examples.com, it will still be replies@gmail.com

So technically give the above, this configuration should be like:

reply_by_email_address enter replies+%{reply_key}@gmail.com
pop3_polling_username enter replies@gmail.com

I also have a follow up clarification on the one the comments in the eMail configuration page

The period in minutes between checking the POP3 account for email. NOTE: requires restart.

What exactly does one have to restart? Discourse or some module and the best way to do it? (GUI option?)