Email Configuration Fails with "550 5.7.1 Relaying Denied"
I'm encountering an issue with sending emails from Ghost CMS hosted on Railway. Despite having correct SMTP settings with Mailgun, I consistently receive the following error in the logs:
550 5.7.1 Relaying denied
Background:
I've verified my SMTP settings with Mailgun by testing them directly using curl for both ports 587 (TLS) and 465 (SSL), and both tests were successful.
Here are the environment variables I have set in Railway for Ghost CMS:
curl Test Script:
I used the following curl test script to confirm that Mailgun is processing emails correctly:
Can you help determine why Ghost CMS, with the same SMTP settings, fails with the relaying denied error while the curl test works fine? Is there any specific configuration or network restriction on Railway that might be causing this issue?
8 Replies
Project ID:
71b92ac0-afb1-4da1-af80-1cc0780f0330
71b92ac0-afb1-4da1-af80-1cc0780f0330
Railway logs:
Railway does not block any outgoing traffic, nor do we have a way to do that in the first place.
Please see https://ghost.org/docs/config/#mail for instructions on configuring email.
Thanks @Brody
I did review those settings and also tried to it on another install using these settings and a docker-compose.yml file.
https://catchtheblock.com/how-to-setup-mailgun-in-ghost-self-hosted-docker-compose/
After this and looking at all of the other Railway Discord threads very baffling that I can get the newsletter to send out but can't get the transactional email to work.
Catch The Block
✉️ How to Setup Mailgun in Ghost (self hosted, docker-compose)
This short blog post aims at helping those who are struggling (like me ) to setup properly Ghost and emails (using Mailgun).
I'm really sorry but we arent able to offer support for 3'rd party software
Understood. I think it might be the template - this one worked and I used the same Ghost/Railway variables
https://railway.app/template/9VGb60
It's Ghost CMS/Sqlite - mileage may vary
Sorry we can't do more for you here
There was another post and in it was a discussion about the Railway/Ghost templates - Error on Ghost install. I think the solution is in there - comments, tagging so that the issues can be raised about the templates.