Authenticating Mixpanel Email with DKIM

The Messaging and Mobile A/B testing features are not available for purchase and will be deprecated from the product on January 1st, 2022. Read more information on the Mixpanel blog.

DomainKeys Identified Mail (DKIM) is an email authentication standard intended to let organizations take responsibility for messages sent from their domain. You can read more about it on Wikipedia or the official website.

There are two benefits to setting up DKIM for the email you send with Mixpanel's Messages product:

  1. You can build and protect your domain's reputation among email service providers.

  2. You can get rid of the "via" header in many email clients, like Gmail. Instead of email being shown as coming from " via", it will be shown as simply coming from "".

When Mixpanel sends email for you, it checks to see if you've set up our DKIM public key in your DNS records. If you have, we DKIM sign the mail on behalf of your domain. Thus, all you need to do to get set up is add the following DNS record to your domain.

If, for example, you would like to send a Mixpanel Messages email from you need to set up a DNS TXT record under

The opening and closing double-quotes are a necessary part of the value of the record.

Note: When you copy and paste line breaks may be introduced, which will not work properly. Remove any line breaks or spaces from the string.

You can check the DNS record with the command line tool dig. You should get the following result (with no spaces):

$ dig +short txt

We use it ourselves, so you can see a correct implementation, and check your record against ours, by doing:

$ dig +short txt

Sender Policy Framework (SPF) is an email validation system that works in tandem with DKIM to prevent email spoofing and ultimately increase your email deliverability and inbox placement rates. One SPF record should be made with multiple domains, rather than making multiple SPF records.

To setup SPF for your domain, you will need to add the following DNS TXT record:

"v=spf1 ~all"

To check the SPF DNS record:

nslookup -type=txt

Look for v=spf1 in the results

Did this answer your question?



Article is closed for comments.