I have a bash script that I use with nagios that sends notifications by email. The key part of it looks like this:
# $1 (FROM) | $2 (TO) | $3 (SUBJECT) | $4 (BODY) /usr/bin/printf "%b" "$4" | /bin/mail -s "$3" "$2" -- -f $1
I know I could use the
sendmail command directly (like this) but it would mean reworking a few scripts to take care of building the entire message including all headers.
Is there any way to specify additional SMTP headers using
/bin/mail, in my own case I am trying to add the
Importance: high header?
I'm running exim 4.63 as my MTA and CentOS 5.6 x64.