Discourse Email Failure - DigitalOcean & Mailgun

(cosmo) #1
  • I am using a Digital Ocean Discourse droplet.
  • I have my domain registered at NameCheap
  • I have mail setup through Mailgun.
  • DO is handling DNS.
  • Mailgun is 100% setup and verified.

The problem is most of the emails won’t deliver because of failing authentication.

Please tell me how on earth I fix this. On a scale of 1-10, I’m about a 4.5 as working knowledge of the setup of things such as this are. Answers or tutorials are appreciated. But without step by step, I’ll just be asking you “what did you mean”…

  • my group’s private office365 exchange: routed to spam
  • my yahoo email: not deliverable
  • my gmail: not deliverable.

Mailgun logs:
YAHOO Example:

Gmail Example:


(Matt Palmer) #2

Looks like your domain has a DMARC policy, but Mailgun isn’t satisfying it. If that doesn’t mean anything to you, find whoever it was who setup DMARC on your domain and ask them about it. This has nothing to do with Discourse.

(cosmo) #3

I did all the setup.
I saw nothing regarding DMARC policy setup. :frowning:

I have Namecheap using Digital Ocean for DNS, so I can’t input any settings at NC.
What/where do I have to update what on DO’s DNS management?

(Matt Palmer) #4

And yet:

$ dig _dmarc.do.co  txt

; <<>> DiG 9.10.3-P4-Debian <<>> _dmarc.do.co txt
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18723
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 4096
;_dmarc.do.co.                  IN      TXT

_dmarc.do.co.           300     IN      TXT     "v=DMARC1; p=reject; pct=100; rua=mailto:fdpfb1lo@ag.dmarcian.com; ruf=mailto:fdpfb1lo@fr.dmarcian.com"

If you didn’t set that up, but you did all the setup, how did that get there?

(cosmo) #5

I have no idea.
I setup all the TXT, MX, CNAME, A, and NS records on DigitalOcean that were provided by mailgun, and required to point DNS to the IP for the server.

These were all the ones provided by mailgun. I had nothing else.

The only thing I did AFTER your reply was attempt to create txt records via: DMARC Guide | Global Cyber Alliance | Email Authentication Made Easy

To no avail I might add…

(Jay Pfaffman) #6

Open a ticket with mailgun. They should be able to help you.

You can do a test with http://www.mail-tester.com. It explains some of the issues that you are having.

(James) #7

This is similar to another user who was having email troubles. Have you thought about switching your DNS over to Namecheap? I have the exact same setup (Digital Ocean host, Namecheap registrar, Mailgun for mail) and have had no problems with deliveries since I got it set up.

(Stephen) #8

Are you using the same domain for outbound mail from Discourse as you use at O365 or anywhere else?

(James) #9

Sorry, I didn’t catch the bit about Office 365. I have everything going to a G Suite account but getting mailed from Mailgun, so invites and stuff like that get handled by Mailgun. My Namecheap DNS has all of the Mailgun credentials in it but I also have GMail selected as the “Mail Settings” on the DNS settings page on Namecheap.

(Jay Pfaffman) #10

Did you open a ticket with mailgun? Did you see what mail-tester’s tests had to say?

(cosmo) #11

Not yet. I will when I get home tonight! Thank you for the guidance