Skip to content

Commit dfa94ec

Browse files
committed
Release 4.0.16 - See CHANGELOG.md
1 parent eaea6dc commit dfa94ec

4 files changed

Lines changed: 17 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 4.0.16 2023-11-17 <dave at tiredofit dot ca>
2+
3+
### Changed
4+
- Switch to using msmtp instead of s-mail for notify()
5+
6+
17
## 4.0.15 2023-11-16 <dave at tiredofit dot ca>
28

39
### Changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ENV INFLUX1_CLIENT_VERSION=1.8.0 \
1010
MSODBC_VERSION=18.3.2.1-1 \
1111
MSSQL_VERSION=18.3.1.1-1 \
1212
AWS_CLI_VERSION=1.29.78 \
13-
CONTAINER_ENABLE_MESSAGING=FALSE \
13+
CONTAINER_ENABLE_MESSAGING=TRUE \
1414
CONTAINER_ENABLE_MONITORING=TRUE \
1515
IMAGE_NAME="tiredofit/db-backup" \
1616
IMAGE_REPO_URL="https://github.com/tiredofit/docker-db-backup/"

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,9 @@ $5 body/error message
742742

743743

744744
##### Email Notifications
745+
746+
See more details in the base image listed above for more mail environment variables.
747+
745748
| Parameter | Description | Default | `_FILE` |
746749
| ----------- | ----------------------------------------------------------------------------------------- | ------- | ------- |
747750
| `MAIL_FROM` | What email address to send mail from for errors | | |

install/assets/functions/10-db-backup

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,13 +1363,15 @@ notify() {
13631363
if [ -z "${SMTP_HOST}" ] ; then write_log error "[notifications] No SMTP_HOST variable set - Skipping sending Email notifications" ; skip_mail=true ; fi
13641364
if [ -z "${SMTP_PORT}" ] ; then write_log error "[notifications] No SMTP_PORT variable set - Skipping sending Email notifications" ; skip_mail=true ; fi
13651365
if var_nottrue "${skip_mail}" ; then
1366+
if ! grep -q ^from /etc/msmptrc ; then
1367+
echo "from ${MAIL_FROM}" >> /etc/msmtprc
1368+
fi
13661369
mail_recipients=$(echo "${MAIL_TO}" | tr "," "\n")
13671370
for mail_recipient in $mail_recipients ; do
1368-
cat <<EOF | s-nail -v \
1369-
-r "${MAIL_FROM}" \
1370-
-s "[db-backup] [${DOMAIN}] ${3}" \
1371-
-S smtp="${SMTP_HOST}":"${SMTP_PORT}" \
1372-
"${mail_recipient}"
1371+
cat <<EOF | msmtp -t "${mail_recipient}" -c /etc/msmtprc
1372+
To: ${mail_recipient}
1373+
Subject: [db-backup] [${DOMAIN}] ${3}
1374+
13731375
Time: ${1}
13741376
Log File: {2}
13751377
Error Code: ${3}

0 commit comments

Comments
 (0)