From 2ad58dc07ee7f5dc0661c9f0cc515be6f03e3c6c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 27 Mar 2017 18:56:06 +0100 Subject: [PATCH] [hostname] contains invalid character '[' in CentOS 7 [hostname] contains invalid character '[' in CentOS 7 changed [ to ( See https://www.jethrocarr.com/2012/06/10/mailx-contains-invalid-character-2/ There may be a better way to resolve this however this quick fix works --- duplicity-backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duplicity-backup.sh b/duplicity-backup.sh index 213f7f7..932d8ba 100755 --- a/duplicity-backup.sh +++ b/duplicity-backup.sh @@ -488,7 +488,7 @@ email_logfile() if [ ! -x "${MAILCMD}" ]; then echo -e "Email couldn't be sent. ${MAIL} not available." >&2 else - EMAIL_SUBJECT=${EMAIL_SUBJECT:="duplicity-backup ${BACKUP_STATUS:-"ERROR"} [${HOSTNAME}] ${LOG_FILE}"} + EMAIL_SUBJECT=${EMAIL_SUBJECT:="duplicity-backup ${BACKUP_STATUS:-"ERROR"} (${HOSTNAME}) ${LOG_FILE}"} case ${MAIL} in ssmtp) mailcmd_ssmtp;;