· 3 min read

How to stop Mailgun emails going to junk

Learn how to stop Mailgun emails from going to spam or junk. Learn how to authenticate via SPF and DKIM and remove 'via mailgun.com' and 'on behalf of mailgun.com' from your marketing campaigns to enhance your deliverability, professionalism, and credibility.

Learn how to stop Mailgun emails from going to spam or junk. Learn how to authenticate via SPF and DKIM and remove 'via mailgun.com' and 'on behalf of mailgun.com' from your marketing campaigns to enhance your deliverability, professionalism, and credibility.

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

Contact Us

Get Experienced Consulting Today

Our support team typically responds within 24 business hours.

    Share:
    Back to Blog

    Related Posts

    View All Posts »
    Anti Spam Laws Around the World

    Anti Spam Laws Around the World

    Spam, unsolicited electronic communication, has become a global issue that affects individuals, businesses, and governments alike. Various countries have developed anti-spam laws to protect consumers from unwanted emails, messages, and other forms of digital marketing. These laws vary by region, but they generally focus on requiring consent from recipients, providing clear opt-out mechanisms, and penalizing violators with hefty fines. Below is an overview of key anti-spam regulations from the United States, Canada, New Zealand, Australia, Ireland, and the United Kingdom.

    What is Risk Reductin in Cyber Security - 50 Ways to Reduce Risk

    What is Risk Reductin in Cyber Security - 50 Ways to Reduce Risk

    Explore the essentials of risk reduction in cyber security and learn how to proactively protect your organization. Uncover strategies for minimizing vulnerabilities, strengthening defenses, and implementing best practices to lower potential cyber threats and ensure robust digital security.

    What is Risk Transfer in Cyber Security - 40 Ways to Transfer Risk

    What is Risk Transfer in Cyber Security - 40 Ways to Transfer Risk

    Discover how risk transfer in cyber security can safeguard your organization. Learn about strategies to mitigate potential cyber threats by shifting liability, utilizing insurance, and partnering with third-party experts. Explore effective ways to protect your digital assets.