The discussion revolves around setting up a support inbox. jeffbyrnes wants to create a central mailbox for his organization using Discourse, similar to how Team Discourse handles emails. He is currently using Google Apps for emails and Mailgun for Discourse emails.
JammyDodger suggests using the mail-receiver to handle incoming emails, but Stephen points out that this solution only works for a single domain, and jeffbyrnes wants to use a mailbox at the root domain.
pfaffman proposes setting up the mail receiver on a different subdomain and then forwarding the mail from the main domain to the Discourse subdomain. jeffbyrnes tries to implement this solution but encounters issues with the Mailgun plugin.
After some troubleshooting, jeffbyrnes finds the solution:
Set up a Mailgun Receiving Route for the address or RegEx pattern for receiving incoming email.
Visit Google Admin and create a route that maps the address or pattern on the main domain to the Mailgun-powered subdomain.
This solution allows jeffbyrnes to set up a support inbox using Discourse and handle emails from the main domain.
Anyone can email team@discourse.org and we handle those interactions in a central discourse mailbox, as private group messages.
How did y’all set that up? I would love to do this for steering@somervilleyimby.org (we currently use a Google Group & it’s pretty awkward). I use Google Apps for emails received by & sent from somervilleyimby.org, and Mailgun to handle Discourse emails (e.g., jeff@somervilleyimby.org; these are sent/received via discourse.somervilleyimby.org) so I’m a little unclear how I might set this up.
Inbound & outbound email from our Discourse uses discourse.somervilleyimby.org via Mailgun, and is configured well.
But how would I map an email address on the main domain to be received by a Group inside Discourse?
I realize this is maybe outside the scope of Discourse itself, but figured someone might have an idea, and I suspect there are individual person@discourse.org addresses while also a shared team@discourse.org address that lands inside Team Discourse’s instance.
I’m not 100% sure I’m following you right, but I use the mail-receiver on my self-hosted site to handle the incoming emails, and allow email-in in the admin settings, then set an email address in the group/category settings for where I want something to end up.
So he’d need to set up the mail receiver on a different subdomain, and then forward the mail from the real one to the discourse one. (this should get split to its own topic)
Thanks everyone, and appreciate breaking this out to its own topic.
@JammyDodger that def. sounds like it would do the trick, and @pfaffman sounds like he’s right on the money with how I could handle my domain + subdomain setup.
If anyone is curious, the subdomain is what Mailgun suggests as best practice if you already have email on your domain handled by another entity (Google Apps, in our case).
So I figured out I can use Gmail routing rules to reroute email to steering@discourse.somervilleyimby.org, and Mailgun then POSTs that to my Mailgun plugin’s endpoint, /mailgun/incoming but they throw 422 Unprocessable Entity errors
Of course, this would all probably be less complicated if the upgrade to Discourse 3.x didn’t appear to break incoming email via the Mailgun plugin entirely