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


#1

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?


#2

@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


#3

@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?


#4

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.


#5

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