Hello all,
I need help with the following. I have a script in my /root/.bash_profile that alerts (sends email) to my company email account if someone logs in to the server. Here is the script:
echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`"
user@company.com
I get the email and all works fine with the script - one problem though. Email that I receive is forwarded from
root@server.com. Here is my question, how do I change this? I would like to change
root@server.com to something that looks like
mgmt.alerts@server.com
All suggestions always appreciated.
Thanks!!
K,