This article covers the SPF and DKIM authentication processes for Mailgun by Pathwire and how they are managed in Valimail Enforce. While only one of the two authentication methods is required for an email to pass DMARC, our recommendation is to configure both whenever possible.


Configuring DKIM authentication for your Mailgun emails

1. Login to your Mailgun account.

2. Go to the Domains tab 

3. Add your domain in the Domain name box.

4. Choose your DKIM key length. Longer keys equal more protection from spammers, so we recommend you to chose the 2048 option.

5. On the domain settings page, you will find the DKIM records generated for your domain in the Domain Verification & DNS section.

6. Copy the DKIM record key value provided - then you need to go and add this DKIM keys in Valimail Enforce.

7. After you publish the Mailgun DKIM key in Valimail Enforce, log back into your Mailgun account, and check for a verified status (a green verification badge) against your domain name to confirm that your domain has been verified and set up with DKIM email authentication.

Add a Mailgun DKIM key in Enforce

1. Go to your domain's Configuration page in Valimail Enforce and publish the newly created DKIM key.

    a. Scroll down and add the two DKIM keys in your configuration, by clicking on Add a DKIM key

    b. Enter the selector name, the DKIM TXT value (the actual value is the entire string after the p= tag), associate the key with Mailgun by Pathwire and then click Add.

You can find the instructions on how to set up DKIM in Mailgun here.

Configuring SPF authentication for your Mailgun emails

Once you establish that Mailgun by Pathwire is an authorized sender for your domain, you will need to add the service in your Enabled Senders list in Enforce.

1. Please go to your domain's Configuration page in Enforce.

2. Click on the + sign from the Enabled Senders section:

3. Choose Mailgun by Pathwire from the list of configurable senders and then click Enable:

We encourage you to use the comment section for any useful information about your sending service, such as the name of the service owner, change request ticket numbers, etc.

As always, if you have any questions, please don't hesitate to submit a ticket.