Adding DKIM and SPF Records to DigitalOcean
To add TXT records for SPF and DKIM to your DigitalOcean hosted domain, follow these steps.
Obtain the SPF and DKIM records from Postmark
The first step is to obtain the two TXT record entries from your Sender Signature in Postmark. Log into Postmark and navigate to the Sender Signatures section. Click 'Authentication' for the Sender Signature you are adding DKIM and SPF records for.
You will then see entries for both DKIM and SPF:
These records will be used once you login to DigitalOcean, so keep the window or tab open in your browser.
Adding Records to DigitalOcean
Log in to DigitalOcean and click Networking.
Once you are in the Networking area, click Domains on the left.
Click on the blue magnifying glass icon for the domain you are adding the records for. You will then see an option to add a record to your DNS. Click TXT for the type and for Name, enter the Host value from the Sender Signature DKIM entry. Populate the Text field with the DKIM entry’s text from the Sender Signature area in Postmark.
Next add the SPF record in a similar fashion, except use @ for the name.
IMPORTANT: The text added for each record must be surrounded in quotes to be accepted.
Once both of these records have been added you will see them in your list of DNS records.
To verify SPF, click on the Verify link in the Sender Signature setup page next to the SPF record. For DKIM, Postmark will check your DNS records every five minutes to see if it is valid. Once it is identified, the DKIM record will be verified automatically.
If everything is propagated and working, you will see a green checkmark in your Sender Signatures page showing that the domain has been verified. You can now also send from any email address on that domain, not just the original Sender Signature that was added.
What if it does not verify? There are some common reasons why this might not happen.
- DNS takes some time to propagate. You may have to wait a few hours.
- Use the dig command in Terminal to confirm that the records were successfully added. In the ANSWER SECTION you will see both TXT records and their contents if they were added successfully. The command has the following format:
dig yourdomain.com TXT
You will then see output like the following.