Can someone please tell me how to get DKIM and SPF set up?
I’d like to use Mailgun or Sendgrid for sending and receiving my email but they (both) require DKIM and SPF records.
I added (their) DNS entries in the DO DNS panel as supplied and they aren’t showing up when I verify on their system so I’m assuming there’s something else I need to do.
My system is CentOS 6.4 x64, Nginx.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hello there,
We do have an article on How To use an SPF Record to Prevent Spoofing & Improve E-mail Reliability
https://www.digitalocean.com/community/tutorials/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability
A DKIM record is another measure that can prevent spoofing and improve mail reliability. You can use any online tool to generate the key for you.
Also if you use any control panel for your server, like cPanel it will have the built-in functionality to create the DKIM record on your behalf
Once created you can use a DKIM checker tool like the one provided from mxtoolbox and check whether the generated key is valid.
https://mxtoolbox.com/dkim.aspx
Hope that this helps! Regards, Alex
BINGO … that did the trick :)
I discovered by looking my DNS in my cPanel server on another droplet that I was missing the trailing “.” on the entry. ie: example.com. I need to tell mailgun to update their instructions.
I did wrap them in quotes yes. As for propagation, Mailgun is already picking up my CNAME entry so there’s no reason it shouldn’t pick up my DKIM and SPF entries. <br> <br>Do I not need to have a local DKIM key installed or will that be handled by theirs? <br> <br>Thanks for your help.
Did you wrap the entries in quotes? Also, remember that DNS records can take up to 48 hours to propagate through the Internet. Check out <a href=“https://www.digitalocean.com/community/articles/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability”>How To use an SPF Record to Prevent Spoofing & Improve E-mail Reliability</a>.