Docker image based on ubuntu:20.04 with s-nail and a shell-script mail.sh for sending e-mails
By now only starttls is supported.
| variable | description |
|---|---|
| SUBJECT | the value for -s |
| SMTP_SERVER | used for -S mta=smtp://${SMTP_SERVER}:${SMTP_PORT} |
| SMTP_PORT | used for -S mta=smtp://${SMTP_SERVER}:${SMTP_PORT} |
| MAIL_FROM | used for -S from="${MAIL_FROM} |
| MAIL_USER | used for -S smtp-auth-user=${MAIL_USER} |
| MAIL_PASSWORD | used for -S smtp-auth-password="${MAIL_PASSWORD}" |
shell (keeping the container running)
docker run -d -e ... -e ... --name s-nail s-nail:latest tail -f /dev/null
ansible (keeping the container running)
- name: Ensure s-nail
community.docker.docker_container:
name: s.nail
image: "s-nail:latest"
env:
SMTP_SERVER: "..."
SMTP_PORT: "..."
MAIL_FROM: "..."
MAIL_USER: "..."
MAIL_PASSWORD: "..."
command: tail -f /dev/null
restart_policy: always
container_default_behavior: compatibility
send mail
echo "mail-content" | docker exec --interactive s-nail mail.sh -s <subject> <to-mail>
Content type
Image
Digest
sha256:fa7ad0ffc…
Size
93 MB
Last updated
9 days ago
docker pull lwith/s-nail