The issue here is with inbound emails using Mailgun's inbound routes functionality.
Protecting your sending servers from abuse isn't an issue with Mailgun as far as I'm aware.
35 karma · joined July 10, 2023
The issue here is with inbound emails using Mailgun's inbound routes functionality.
Protecting your sending servers from abuse isn't an issue with Mailgun as far as I'm aware.
- CRM system (obviously an issue) - Inbound email automation (eg. action based on reply from user / admin / etc)
But really, any inbound action where you don't want someone to be able to trivially spoof the sender, when the sender has SPF/DKIM/DMARC all configured.
For people using Mailgun purely for marketing email purposes, this is unlikely to be an issue, as you're unlikely to be using inbound routes for automation/processing.
https://securitytrails.com/list/mx/mxb.mailgun.org
https://securitytrails.com/list/mx/mxa.mailgun.org
[1] - https://www.reddit.com/r/sysadmin/comments/14vtszl/comment/j...
Yes - the result of the checks aren't passed through for inbound emails (when sent to webhooks).
Why? It's not outlined in their specs, their sales copy implies they are handling it, and sensible headers are sometimes there which is extra misleading.
The recipient has to be a mailgun user, yes.
Yes. Except in this case, the company is paying Mailgun to process inbound mail and attach SPF/DKIM/DMARC headers, which they don't do. And this is counter to their own API spec.
If you are running your own SMTP server, then you wouldn't be relying on headers from Mailgun.
Essentially though you are right, using Mailgun is akin to having an SMTP server without any spam protection in place, and limited ability to put that spam protection in place. You are better off running the server yourself.
The point here is that Mailgun customers won't be aware of this, and as such, it's a vulnerability.
All in all this means the vast majority of emails don't have these headers included in webhooks, and we have plenty of examples of spoofed emails for our own domain (invalid SPF/DKIM and failed DMARC) that get through without triggering spam assassin.
This simplest way to verify this is to store the value of these headers along with all inbound emails hitting your webhooks, you'll quickly see they are missing the majority of the time.
However, with regards to "SPF is more than enough", the fact here is that the SPF header isn't passed to the webhook, so it can't used in a mailgun inbound route.