Setting up DKIM for Mailgun

Good day to you.

I’m trying to setup DKIM for Mailgun to point to MXToolbox. The selector that I’m including as a TXT is 20180914-mzuohskz._domainkey, followed by the code, which starts with “v=DKIM1; k=rsa; p=MIGfM…”

It fails to validate at both MXToolbox and at other validators. MXToolbox made a number of suggestions, and helped get everyone else validated, but nothing has worked for Mailgun.

I’ll appreciate your suggestions!


Thank you for asking.

May I ask you to share your domain name so we could lookup and re-check if the DKIM record is existing and valid? :thinking:

What errors do you get while using those online tools to check?

Is the given value/key “split” or “full”?

Is the other part of the hostname (DNS record) used for Mailgun as a TXT type, or

To point to MXToolbox … maybe you want to setup DMARC aside SPF and DKIM and use MXToolbox email for DMARC reports? :thinking:

Thank you for the quick reply. The domain is Our other adds (Rackspace and iContact) work as expected by following the instructions. MXToolbox can’t confirm the selector for Mailgun.

Furthermore, I can see it’s existing and good:


Google DIG:

I am afraid you might entered one “dot” surplus, or entered the ._domainkey part when you checked for it as MXToolbox adds it automatically :thinking:

It’s fine, see on the link below (or screenshot):

Using Dmarcian, also good:

I’d suggest you to try and send/receive e-mail from Mailgun using online tools on the links below you could test and troubleshoot more what is going on with your e-mails (in case if so):

Neverthless, I would also recommend looking into the below article due to further prevention of your e-mails being marked as a SPAM at the recipient’s side by implementing DMARC:

Otherwise, seems to me like you have two DKIM records? :thinking:
And haven’t entered the correct value for the “name” field of the TXT record? :thinking:
It’s also missing the v=DKIM; part …

;ANSWER 300 IN TXT "k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPZn8qFJAut0zYiM7DxUxv6XMYzHGvd0P7Qqmr1gqP7yjoCO+BOL1EixYabDps3QK7XFNHHkYPXgAAe9+K7aley3AAGrcUlsVfRpzq7ExS5cPQQVE+oeX8OfEn6kkGzX61ef2nFYG8lNbuwjPPgt1AjTnuJQ521DBn7NWicZks+QIDAQAB"

Or, rather the above one is some surplus record which you should be removed? :thinking:

Or, sorry … you might be using different email services and/or your own server / email provider + Mailgun, so you have two DKIMs correctly set? :thinking:

1 Like

Excellent! Thank you for your on-target guidance.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.