-
Hey, this is more a question: Is there any documentation how to send mails with this docker container after it is successfully installed and configured? I wonder if there is a way to do something like this so that the host (that is hosting the docker container) is able to send mails using the mail command: https://github.com/nextcloud/vm/blob/1a0d3a584151a7921f677aaab5ea95a3393c3850/addons/smtp-mail.sh#L232 And also, can it make use of the host's /etc/aliases file? Many thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I've figured it out |
Beta Was this translation helpful? Give feedback.
-
@szaimen Something like that # create bridge
docker network create -d bridge testsmtp
# run msmtpd
docker run -d -p 2500:2500 --name msmtpd --network testsmtp \
-e "SMTP_HOST=smtp.example.com" \
crazymax/msmtpd
# send test mail
docker run --rm -it alpine --network testsmtp \
apk --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing add swaks && \
swaks -f bar@foo.com -t webmaster@foo.com --server msmtpd:2500 |
Beta Was this translation helpful? Give feedback.
-
Thanks! 👍 |
Beta Was this translation helpful? Give feedback.
-
I think I will add swaks to ease debugging. |
Beta Was this translation helpful? Give feedback.
@szaimen Something like that