I have the following script which send get variables from mrtg and then sends mail using the /bin/mail program. The only problem is the mail is sent by root. How can i change this script so that the mail comes from another address? Please help!
###########################################################
#!/bin/sh
if [ $1 == "172.28.1.1_MTA" ] ; then
DEST="<user@mail.co.za>"
else
DEST="<user@mail.co.za; user1@mail.co.za; user3@mail.co.za>"
fi
( echo "Load on $1 currently $3, but should be not more than $2."
echo "See " |mail -s "load on $1" $DEST
##########################################################
###########################################################
#!/bin/sh
if [ $1 == "172.28.1.1_MTA" ] ; then
DEST="<user@mail.co.za>"
else
DEST="<user@mail.co.za; user1@mail.co.za; user3@mail.co.za>"
fi
( echo "Load on $1 currently $3, but should be not more than $2."
echo "See " |mail -s "load on $1" $DEST
##########################################################