diff --git a/duplicity-backup.conf.example b/duplicity-backup.conf.example index c81aaf7..168e28c 100644 --- a/duplicity-backup.conf.example +++ b/duplicity-backup.conf.example @@ -209,6 +209,7 @@ MAIL="mailx" # default command for Linux mail #MAIL="mail" # for CentOS, if "mailx" fails try this one #MAIL="ssmtp" #MAIL="sendmail" +#MAIL="msmtp" # TROUBLESHOOTING: If you are having any problems running this script it is # helpful to see the command output that is being generated to determine if the diff --git a/duplicity-backup.sh b/duplicity-backup.sh index 0228866..6dec36f 100755 --- a/duplicity-backup.sh +++ b/duplicity-backup.sh @@ -271,6 +271,8 @@ email_logfile() EMAIL_SUBJECT=${EMAIL_SUBJECT:="duplicity-backup alert ${LOG_FILE}"} if [ "$MAIL" = "ssmtp" ]; then echo """Subject: ${EMAIL_SUBJECT}""" | cat - ${LOGFILE} | ${MAILCMD} -s ${EMAIL_TO} + elif [ "$MAIL" = "msmtp" ]; then + echo """Subject: ${EMAIL_SUBJECT}""" | cat - ${LOGFILE} | ${MAILCMD} ${EMAIL_TO} elif [ "$MAIL" = "mailx" ]; then EMAIL_FROM=${EMAIL_FROM:+"-r ${EMAIL_FROM}"} cat ${LOGFILE} | ${MAILCMD} -s """${EMAIL_SUBJECT}""" $EMAIL_FROM ${EMAIL_TO}