Getting error when testing or sending mail: getaddrinfo EAI_AGAIN smtp.mailgun.org:587

I tried to configure the sending mail with config file and with environment variables directly on the docker container (on different container). Also try to configure with different mail services, but all bring me a “getaddrinfo EAI_AGAIN smtp.mailgun.org:587” error.

my config file look like:
“mail”: {
“transport”: “SMTP”,
“options”: {
“service”: “Mailgun”,
“auth”: {
“user”: “user@mg.domain.tl”,
“pass”: “sercurePassword”
}
}
},

on an other docker container I tried to set it up with:
–env mail__transport=SMTP
–env mail__options__service=Mailgun
–env mail__options__auth__user=postmaster@mg.domain.tld
–env mail__options__auth__pass=password \

I am running the lastest docker version 1.22.7-alpine.
Do anybody know a solution for the issue?

@CordlessWool the error is saying that a domain lookup failed. I would check your Docker config to ensure that your Ghost instance is able to communicate with the outside world

@Kevin What exactly I have to look for? After searching with this new information and got to the page: https://development.robinwinslow.uk/2016/06/23/fix-docker-networking-dns/. I doing the test and they a working fine. Is that the issue you think?

What exactly I have to look for?

I don’t know, I don’t use Docker and it’s not a supported environment. All I can tell you is that the getaddrinfo EAI_AGAIN error is typically raised when the DNS provider responds that it can’t service the request right now or that there was a timeout when performing the DNS lookup. Seeing as you get the error repeatedly and with different mail services it suggests that there is a DNS problem somewhere in your setup.

Ok I got it work. Problem was that, the docker container was only mapped to a other bridged network then the default bridge network

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.