Sign inSign up

lwith/s-nail

By lwith

•Updated 9 days ago

Image
2

4.1K

lwith/s-nail repository overview

⁠s-nail

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.

⁠Environment Variables

variabledescription
SUBJECTthe value for -s
SMTP_SERVERused for -S mta=smtp://${SMTP_SERVER}:${SMTP_PORT}
SMTP_PORTused for -S mta=smtp://${SMTP_SERVER}:${SMTP_PORT}
MAIL_FROMused for -S from="${MAIL_FROM}
MAIL_USERused for -S smtp-auth-user=${MAIL_USER}
MAIL_PASSWORDused for -S smtp-auth-password="${MAIL_PASSWORD}"

⁠Usage

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>

⁠trivy

Tag summary

Content type

Image

Digest

sha256:fa7ad0ffc…

Size

93 MB

Last updated

9 days ago

docker pull lwith/s-nail