We've used Mailgun for 8+ years for inbound email routing, and always noticed lots of emails ended up in our spam folder(s).
After speaking to the Google team, it turns out that Mailgun is simply not compatible with Gmail when using inbound routes as it doesn't "relay" emails, but rather re-sends them modifying the headers.
This causes all emails to fail SPF! This means a certain (often large %) of your emails will end up in the spam folder for no good reason.
From Google:
"We've identified that Mailgun is re-sending those emails, while Google is expecting for those emails to be relayed. Re-sending emails causes the SMTP sender to change to [redacted]. What happens then is SPF is checked for [redacted]. Inbound gateway is telling to ignore Mailgun's IP address, so the previous one is being used instead. This would cause all emails to fail SPF.
In this scenario, it's recommended to contact Mailgun and ask them if there's a way to relay those emails, so that SMTP sender would not change."
Mailgun Response:
"Unfortunately, there isn't much that can be done to prevent this as this is how our Routes work"
Any solutions?
Has anyone managed to work around this issue?
Or does anyone have a fully-featured recommended alternative to Mailgun Routes?