Docker Community Forums

Share and learn in the Docker community.

Using sendmail/postfix with docker container

Hey all, I think I’ve tried about everything. I’m running a cachet server with a docker container ( I’m trying to send emails with my host machine’s postfix configuration. I’ve tested postfix on my host machine and it sends emails fine. However the container doesn’t seem to want to send emails out using the sendmail.
The mailing configuration is configured the following way:
- MAIL_DRIVER=sendmail
- MAIL_HOST=localhost

I received this solution from an online source (github [dot] com/CachetHQ/Cachet/issues/2490) and it still didn’t seem to work.

I also configured my sendmail to allow docker requests on my host machine following this guide (Send an email from a Docker container through an external MTA with ssmtp | Michele Bologna). Which basically says to add the docker inet to inet_interfaces and the docker container ip to mynetworks.

However after all of this I’m still stuck.

Thanks for any help