diff --git a/etc/cron.daily/warn-git-status b/etc/cron.daily/warn-git-status index d274574..7645bea 100755 --- a/etc/cron.daily/warn-git-status +++ b/etc/cron.daily/warn-git-status @@ -6,4 +6,4 @@ CONFIGSTATUS="$(cd / && git status | egrep -ve "^(On branch|Your branch|No commi [[ -z "$CONFIGSTATUS" ]] && exit 0 -mailx "${MAILX_ARGS[@]}" -r "$EMAIL_FROM" -s "git statuses" "${EMAIL_TO[@]}" <<<"$CONFIGSTATUS" +mailx "${MAILX_ARGS[@]}" -S from="$EMAIL_FROM" -s "git statuses" "${EMAIL_TO[@]}" <<<"$CONFIGSTATUS" diff --git a/etc/mail.conf b/etc/mail.conf index 28e24e6..fdabe64 100644 --- a/etc/mail.conf +++ b/etc/mail.conf @@ -1,6 +1,6 @@ # This file is sourced by various scripts that need to send emails. -case "$(hostname -d)" in +case "${HOSTNAME#*.}" in afterdark.lan) EMAIL_DOMAIN="afterdark.org.uk" ;; @@ -10,7 +10,7 @@ case "$(hostname -d)" in esac EMAIL_FROM="${HOSTNAME%%.*} " -EMAIL_TO=("Systems Administrator ") +EMAIL_TO=("sysadmin@$EMAIL_DOMAIN") case "$1" in sbosrcarch)