I’m trying to set up split email delivery using Mailgun alongside Google Workspace but keep running into issues. Every time I attempt to configure this setup, I encounter the same error message:
Error from receiving server:
550 5.7.1 Mail relay not permitted
I’ve tried following several different configuration tutorials online, but none of them seem to work properly. The goal is to route certain emails through Mailgun while keeping others going through Google Workspace normally.
Has anyone successfully implemented this type of email routing configuration? What specific steps or settings am I likely missing that would cause this relay permission error to keep appearing?
definitely double-check ur mx records. i had the same prob! mailgun needs ur domain to be verified. also, don’t forget to add mailgun to ur spf record or u’ll keep hitting that error. good luck!
This error happens when Mailgun gets emails without the right authentication headers. Had the same problem setting up our multi-tenant email system last year. Google Workspace was trying to route all outbound mail instead of letting certain emails go to Mailgun first. You’ll need to set up email filtering rules in Google Admin Console to exclude specific email patterns from Google’s SMTP. Create transport rules that catch which emails should skip Google Workspace completely and hit Mailgun’s servers directly. Set up the routing logic at the Google Workspace level before emails leave for external servers. Also double-check that your app or email client completely switches authentication contexts when sending through different services - mixing credentials between services breaks authentication.
That relay error means your authentication isn’t set up right. I’ve hit this same issue tons of times at work.
You’re probably missing DKIM config. Add Mailgun’s DKIM records to your DNS - most people skip this step and wonder why it doesn’t work.
Also check if you added Mailgun’s IP ranges to your allowed senders in Google Admin Console. Google blocks relay attempts without this.
For routing, set up rules based on sender address or subject patterns. I always automate email routing because doing it manually gets messy quick.
Latenode’s great for email routing workflows. Set up conditional logic that picks Mailgun or Google Workspace automatically based on your criteria. Saves you from fighting with DNS records and relay permissions.
That relay error happens when you try to handle routing manually through email clients or server configs. I’ve watched this break so many setups.
Forget the DNS juggling and SMTP credential switching. You need an automation layer that handles routing before emails hit the servers.
Built something like this last year - transactional emails through Mailgun, internal stuff staying in Google Workspace. Manual routing was a maintenance nightmare.
Use Latenode to intercept outbound emails first. It analyzes sender, recipient, subject, whatever criteria you want, then automatically routes to the right service with proper auth.
This kills the relay permission issues since each email gets sent with correct credentials for its destination. No more MX record fights or auth conflicts.
Latenode handles the conditional logic and API calls to both services. Way cleaner than configuring split routing at server level.
This error happens when your domain authentication isn’t complete on Mailgun’s side. I hit this exact issue last month when migrating our company’s email setup. I’d set up the MX records correctly but forgot to verify the domain in Mailgun’s control panel itself. Go into your Mailgun dashboard and complete domain verification - you’ll need to add their specific TXT records to your DNS. You also need to configure your email client or app to use Mailgun’s SMTP settings for emails that should go through Mailgun, while keeping Google Workspace settings for regular emails. The relay error happens because the receiving server doesn’t recognize your sending authority. Make sure you’re authenticating against the right SMTP endpoint for each service depending on which route you want the email to take.
check if ur using port 587 for mailgun smtp - it usually works better than 25. also make sure ur firewall isn’t blocking outbound connections to mailgun’s servers. that one got me once too.
Had the same problem when we set up email last year. That 550 relay error means Mailgun doesn’t recognize your domain for sending. You need to check your DNS settings AND make sure Mailgun’s SMTP credentials are set up right in your routing system. Here’s the key part - when you’re sending through Mailgun, you’ve got to use Mailgun’s domain credentials, not Google Workspace’s. Google Workspace can be stubborn about old routing configs too, so after you change DNS settings, give it up to 24 hours to fully propagate. Start by testing with just a few emails and watch the logs from both Google and Mailgun - that’ll show you exactly where the authentication is failing.