Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple DKIM and SPF DNS records

We uses both Mailgun and Google App engine mail services to send transaction emails from our products. Both needs DKIM and SPF text record in the DNS server. Is it possible to set multiple DKIM and SPF record in DNS configuration? Will it work?

like image 549
Fizer Khan Avatar asked Jul 28 '14 10:07

Fizer Khan


People also ask

Can you have both SPF and DKIM?

Is it necessary to use both SPF and DKIM? While not mandatory, it's highly recommended to use both SPF and DKIM to protect your email domains from spoofing attacks and fraud while also increasing your email deliverability.

Can I use the same DKIM key for multiple domains?

You can use the same key for multiple domains. Using different selectors for the same key won't help your reputation. It will also make signing more difficult. You can use the same selector for different keys as they will be published under different domains.

How many DKIM keys can you have?

You can have only one active DKIM key per domain name.

Can I have more than one SPF record?

The answer is no: a domain MUST NOT have multiple SPF records, otherwise SPF fails with PermError. An SPF record is a TXT record in the DNS starting exactly with "v=spf1", followed by an array of mechanisms and/or modifiers.


1 Answers

You would only need a single SPF record as you can have multiple rules within it. Check this article for assistance on setting up more than just Google's entries in your SPF record.. Your DKIM signature will specify the subdomain on your domain to check for the signature key. Google Apps uses the google._domainkey subdomain when it specifies the DKIM location to lookup. I'm not sure what mailgun uses but chances are it won't overlap.

Update:

After a quick look around I found this article on Mailgun's website and would think your SPF record should look like this:

v=spf1 include:mailgun.org include:_spf.google.com ~all

like image 183
someone1 Avatar answered Sep 25 '22 15:09

someone1