Configuring both direct delivery email and a forwarding rule

Continuing the discussion from Straightforward direct-delivery incoming mail:

I followed your steps and everything is working! I see bounces in the Rejected bin and have tested direct replies email. Way cool! I do however see a problem especially for non-Linux newbies setting up a forum for the first time, such as myself—this having to do with the MX record.

If I understand this correctly; by designating example.com as the mail host (by way of the MX record), for incoming mail to example.com, this in-turn appears to eliminate the possibility of using an external easy-to-use website for establishing our general email inbox email address i.e. admin@example.com. This address is printed of course in the Discourse “About” tab by default, and I want the forum I’m creating to indeed have such an address. Because I’m not a techie, and because I see other threats with hosting my own mail server, I feel rather strongly that the inbox for admin@example.com should live outside my DO droplet. I did play with Postfix last night for longer than I care to admit, but in the end, was unsuccessful getting it running. After sleeping on this though, I just feel I’m not well suited to create a mail server on DigitalOcean. I vision more problems than solutions. Simplicity is my focus.

Goal: point my to-be-created admin@example.org to a to-be-created Gmail inbox. Can someone help me understand what I sacrifice by doing this though? If all I lose is immediacy of content appearing, I can live with this. Note: as I see it now, my MailGun setup can stay as-is, for outbound, but then I will need to create TWO Gmail accounts: one that is specifically for bounces, which will be “called upon” (POP3), and another for people who author emails to admin@example.org—the latter of which will end up in a to-be-named @gmail account, which is what I would respond to them on. [Edit: I should clarify; my registrar, NameCheap, allows creation of alias email addresses, and forwarding them (i.e. to Gmail) for free without the need to purchase their own (already cheap) email hosting service.

Do I have this right? Thanks a TON for you help and for all the posts here. I’ve learned a lot!

Hooray!

What is generally recommended is that your forum run on a subdomain (e.g., www.example.com, forum.example.com). Then you’d be using xxx@www.example.com as your mail domain and not have an issue with receiving mail at example.com. So then you would configure incoming group/category posts as whatever@forum.example.com. (And it’s really best to not run your web site on the naked/apex domain: Ojktoto > Ada Togel Online Terbaik Di Situs Toto Terpercaya)

2 Likes

@pfaffman Wowza! So you’re saying I can have my cake and eat it too :stuck_out_tongue_winking_eye: ! This sounds very encouraging, as I might be set up close to correct already…

  • My outbound email subdomain is simply mg and works fine, i.e. postmaster@**mg**.example.com (less the stars) on port 2525 per your suggestion. Works dandy. I must have given Discourse whatever it needs (webhooks?) as I see the bounces with this configuration.
  • The one-and-only MX record I have in my DNS settings points mail.example.com to example.com. I have absolutely no idea what it does, if anything at all. Emails do deliver, and bounces are apparent from within Discourse, and direct-reply is working with this configuration though. Yeehaw!
  • My containers/mail-receiver.yml shows MAIL_DOMAIN as mg.mydomain.com —which is same as mailgun (outgoing).

Perhaps that MX record is useless and/or should be renamed, because I haven’t a clue where I defined mail.mydomain.com beyond that MX record.
Where this gets a little hairy, is that I think I need to revert my DNS settings back to the registrar (from DigitalOcean) in order to regain use of the registrar’s email auto-forwarding which is free at NameCheap but only works if the DNS settings are there as well.

My workflow will be to move every DNS entry back to NameCheap exactly as they appear in DO right now, then create my email address i.e. admin@mydomain.com to forward to a gmail address that I just now created. In the end, “Straightforward direct-delivery incoming mail” can remain functional, and I gain an email inbox with the domain—without the need of establishing another subdomain—if I understand you right. Thanks again for helping me understand this stuff, Jay. Cheers!

Some interesting findings after moving all DNS settings back to the registrar for the sole intent of activating their email-forwarding feature. This is a head-scratcher: @Jonathan5 I did remove that standalone MX record to see what would happen. The answer is confusing: though everything still works, there is now a 12-ish minute delay for direct-delivery through email, to posts/comments in the forum. Can anyone make sense of why this is? (my forum is not live yet–still testing/setting it up)

I also learned this: I can’t use the above-linked “feature” and also add an MX record. If an MX record is added, in NameCheap, the email-forwarding feature is disabled and the whole area you see under #6 in that link, is grayed-out and without any content.

What exactly does that MX record do? Mine goes to mail.mydomain.com. By leaving that out, am I introducing a new problem? Seems my options are to (a) leave the MX record as defined in the OP OMITTED in order to (b) establish admin@mydomain.org and forward it, for free, to a newly-created gmail inbox, or (c ) forego direct-delivery altogether and instead select some sort of POP/IMAP setup?

To the latter, $8 for the registrar’s “private email service” is dirt cheap. Not sure what that gains me though. If it’s the ability to assign an MX record again, and by doing that, emails are more secure or deliver more quickly, I’d probably do it. Still trying to get the hang of this stuff :slight_smile: Thanks y’all for being so patient with me, and especially for helping.

1 Like

@Jonathan5 Regret to inform my good-luck run has since changed–without me actually doing anything at all. Must have been propagation delays in the interwebs :thinking:. My previous comment was about 10-15 mins after testing the deletion of the MX record. It has now been 90 minutes and the following no longer work: direct delivery, read receipts, bounced, rejected lists etc. Joy.

@pfaffman here’s the skinny on registrar NameCheap. They use an either-or approach: a customer can choose to install as many MX records as they wish in the DNS settings, but as soon as ONE single MX record is added, they no longer allow the customer to create email addresses/alias i.e. admin@newdomain.com to forward-on to another inbox i.e. @gmail.

Thoughts on best path going forward most welcome. As I see it, to make direct delivery operate, I need an MX record for that, as defined by OP here, and another MX–this one, using a subdomain, for a to-be-purchased email provider. Am I on the right track here? Thanks all!

Maybe your have MAIL_DOMAIN set to mail.domain.com and your forum domain is domain.com so the MX record was what made everything work and you shouldn’t have removed it after all. And it gradually went out of fashion as it propagated. So you need to put it back. Sorry if I had a hand in messing it up for you. And if you need that MX record but can’t have it and use the free email service, then you’re back at square one there too.

I’ve deleted my previous message in case it leads to any confusion.

None in the least! I’m sort of, ehem, “hacking” my way through this—learning as I go. :stuck_out_tongue_winking_eye:

@Ryan_N I was able to do forwarding and MX record with Namecheap as described here