feat: add support for sending email to the docker image
This commit is contained in:
parent
31f5063a96
commit
ea572cb82a
4 changed files with 62 additions and 4 deletions
game
|
@ -1,5 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
(
|
||||
cat <<EOF
|
||||
defaults
|
||||
tls $SMTP_TLS
|
||||
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||
syslog on
|
||||
|
||||
account account
|
||||
host $SMTP_HOST
|
||||
port $SMTP_PORT
|
||||
auth $SMTP_AUTH
|
||||
from $LW_MAIL_FROM
|
||||
EOF
|
||||
if [ "$SMTP_AUTH" = "on" ]; then
|
||||
echo "user $SMTP_USER"
|
||||
echo 'passwordeval "cat /run/secrets/smtp_password"'
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
account default : account
|
||||
aliases /etc/aliases
|
||||
EOF
|
||||
) > /etc/msmtprc
|
||||
|
||||
socat -u \
|
||||
UNIX-LISTEN:/dev/log,reuseaddr,mode=666,fork \
|
||||
SYSTEM:"(sed -z 's/$/\\\\n/'; /bin/echo)" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue