Docker Community Forums

Share and learn in the Docker community.

Unable to send mail from docker container


(Sakshi) #1

Hello,

I am unable to send mail from inside docker container.
I run the following commands on terminal:

sendmail start
sendmail: Cannot open mail:25


(Bryce Ryan) #2

The error message strongly suggests the sendmail program is unable to reach the host named “mail” on port 25. You may need to expose port 25, and also define the forward and reverse DNS for “mail” within your container/image, in order for that to work.