Docker Community Forums

Share and learn in the Docker community.

SMTP-Docker not sending emails, what am I doing wrong?

Please bear with me, as I only started out with Docker a couple fo days ago. I created a brand new VM with CentOS 7 in our ESXi server. Setup Docker and Portainer with no issues.

I wanted to create a simple and fast local SMTP server for some of our devices and services inside the LAN to send email messages, so I pulled the namshi/smtp image and created a container and mapped a random port (32768) to port 25 in the container.

The developer states:

As SMTP Server
You don’t need to specify any environment variable to
get this up.

So I thought there’s nothing else to configure. However, I cannot send email messages. None of my devices or services are able to send emails through the SMTP docker container. These are all external, non-dockerized clients.
Am I missing something here? is it not supposed to work like this?

  • My Docker VM is at
  • The smtp container is in the bridge network at
  • The container has the TCP port 32768 mapped to port 25

I’ve tried sending out email and using as the server with 32768 as the SMTP port. No authentication and no SSL/TLS. All of the apps report an unspecified error.
For good measure I also opened the port 32768 in the CentOS firewall but the problem persist.

What am I missing here?

Logs report the following while trying to send email from a client at (admin@test is the FROM address and is the placeholder for my personal email I used to receive the test messages)

281 LOG: smtp_connection MAIN,
281   SMTP connection from (localhost) [] closed by QUIT,
282 LOG: host_lookup_failed MAIN,
282   no host name found for IP address,
282   H=(localhost) [] F=<admin@test> rejected RCPT <>: relay not permitted,
282 LOG: lost_incoming_connection MAIN,
282   unexpected disconnection while reading SMTP command from (localhost) [] D=0s,
286 LOG: host_lookup_failed MAIN,
286   no host name found for IP address