Logo
Sign InSign Up

How to stop Mailgun emails going to junk

Last modified on Wednesday, May 8, 2024

2 minute read

mailgun.com-emails-going-to-spam

Authenticating Mailgun Emails with SPF and DKIM

Why are my Mailgun emails going to Spam?

If you have a problem with Mailgun emails going to spam, that is, going to the junk folder of your recipients, then it is very likely an issue with your email authentication. Emails failing authentication, be they failing SPF, failing DKIM, or failing DMARC is common, as SPF, DKIM, and DMARC are often not properly implemented by domain administrators. Often, the main cause of Mailgun emails being blocked is due to the Mailgun emails failing DMARC, which in the case of Mailgun, is usually due to a misconfiguration of SPF and DKIM.

How to stop Mailgun emails going to Junk.

The first step to preventing Mailgun email going to spam is to retrieve a failed message and access its header information. This will allow you to quickly diagnose whether any authentication issues such as DKIM or DMARC are flagging your email as spam, instructing the recipient sender to move it to junk. Simply paste the email headers into our free Stellastra Deliverability Tool, which you can use freely with no log in required. Our deliverability tool should allow you to avoid Mailgun emails from going to spam, or at least rule out authentication as the issue.

How to remove 'via mailgun.com' or 'on behalf of mailgun.com'

Another example of where a Mailgun DKIM misconfiguration is to blame, is if your recipients report seeing the message as 'via mailgun.com' or 'on behalf of mailgun.com' and that the emails typically end up in spam or junk. The Stellastra Email Deliverability tool above will confirm this prognosis, however, you may also wish to configure DKIM for Mailgun by logging in to your Mailgun account to check to see if you have followed the following article to configure your Mailgun dkim setup to authenticate your domain.

How to stop Mailgun Failing DMARC

To ensure that your Mailgun campaigns pass DMARC and get delivered to your prospects, it is important to ensure that DKIM and SPF passes authentication for your domain. A common mistake is to sign an email with Mailgun's own DKIM keys. However, in order for Mailgun's email to pass authentication for your own domain, it is necessary to use your own DKIM keys as per Mailgun's own guide. If you wish to verify the above, paste the message headers for a failed Mailgun message into our Mailgun email testing tool. Furthermore, you should also follow the instructions on how to set up SPF authentication for Mailgun.

Get Specialist Deliverability and DMARC Consulting for Mailgun


Share this article

Stellastra The Cyber Security Comparison Platform

© 2024 Stellastra Ltd. All rights reserved. All names, logos, trademarks, et al, belong to their respective owners. No endorsement or partnership is necessarily implied between company and Stellastra and vice versa. Information is provided for convenience only on an as is basis. For the most up to date information, contact vendor directly. Scores including email security, SPF, and DMARC are calculated based on Stellastra's algorithms and other analyses may return different results.

LinkedInTwitter

Company

About StellastraContact usCyber Security Risk ScoreEmail Deliverability ToolTLS Cipher SuitesStellastra Discover

Stay up to date

Stellastra The Cyber Security Comparison Platform