mailx doesn't support -r, use -a

This commit is contained in:
Antoine Beaupr�� 2014-10-14 21:40:55 +00:00
parent 0a697d1401
commit fa5bfd574c
1 changed files with 1 additions and 3 deletions

View File

@ -23,8 +23,6 @@ for CONFIG_FILE in \
. "$CONFIG_FILE"
done
from="noreply@$FQDN"
if [ "x$url" == "x" ] ; then
echo Missing arguments
exit 0
@ -62,7 +60,7 @@ echo -e "\n---------- END ----------"
# If there is an email specified, mail it
if [ ! "x$email" == "x" -a ! "$email" == "null" ] ; then
date=$(date +%x\ %X)
cat "$tmpfile" | mailx -s "AlternC Cron #$id - Report $date" -r "$from" "$(urldecode $email)"
cat "$tmpfile" | mailx -s "AlternC Cron #$id - Report $date" -a "From: noreply@$FQDN" "$(urldecode $email)"
fi
rm -f "$tmpfile"