Reputation: 21
Last week I tried to configure our application to send mails using mailgun. I added the txt and cname records for mg.mydomain.com. But what I actually want is to send on behalf on an email like [email protected] and not the mg.mydomain.com subdomain. So I changed the 'From' address to [email protected]. After a while I noticed 5% of my mail got bounced back because of some spam filter. Probably because there weren't any MX records on the mg.mydomain.com domain. The [email protected] is used by outlook 365. All mail send to us should be delivered at the outlook 365 server, not mailgun.
So the perfect situation for me would be to:
What I'm afraid of is when I'm sending an email from mailgun it still won't get through the spamfilters because the outgoing server (mailgun) is different from the server my MX record points to (outlook 365).
Could anyone confirm this or is this not a problem when setting up extra txt and cname records for mydomain.com?
Upvotes: 2
Views: 2313
Reputation: 3038
You probably use DNS to set up a TXT record in which you state which servers your mail is allowed to come from. (SPF-record). Does this include both the Mailgun servers, and the Office 365 servers?
You probably also set up DKIM to sign the outgoing e-mails. Mailgun automatically signs the e-mails it sends using the DKIM setup. I'm not sure about Office 365. Perhaps the e-mail is being rejected because Office 365 does not sign your e-mails, or perhaps Mailgun and Office 365 both sign the e-mails using different private keys (this is likely), but only one of them has a public key defined in the DNS server (don't know, could be).
As long as you don't set your MX records to something done by Mailgun, you can receive all you want.
Upvotes: 2