Created
February 7, 2016 14:38
-
-
Save svetlyak40wt/460275b0077207e63173 to your computer and use it in GitHub Desktop.
Using nullmailer from docker image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this example shows how to run docker container and use nullmailer, running on a host machine | |
# first, run a container like that | |
sudo docker run \ | |
--rm \ | |
-ti \ | |
-v `which sendmail`:`which sendmail` \ | |
-v `which nullmailer-inject`:`which nullmailer-inject` \ | |
-v `which nullmailer-queue`:`which nullmailer-queue` \ | |
-v /etc/nullmailer:/etc/nullmailer \ | |
-v /var/spool/nullmailer:/var/spool/nullmailer \ | |
ubuntu:trusty \ | |
bash | |
# and check how sendmail works inside the container | |
echo "Hello from container" | sendmail somebody@example.com | |
# it should be put into the /var/spool/nullmailer on the host machine | |
# and sent by daemon which runs on the host machine |
I believe ubuntu:trusty had sendmail installed out of the box.
you are right, sorry didn't see the last line
ubuntu:trusty
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this requires the container to have sendmail installed