Use Case: admin needs to be notified when appuser task is failed, the notification email is sent to appuser by default(check with the command 'mail'), however, we need the notification email to be sent to admin.
1. Login with root user ID
2. Edit the /etc/aliases
file (with vi editor)
3. Append / change an email alias in this format
alias_name: email_id1 [, email_id2,] ...E.g. append this new email alias to the /etc/aliases
appuser: admin@xx.com
4. Save and exit the alias file
5. Execute the newaliases
command followed by echo $?
(suppose there is no error found, you will get a 0 returned by the echo command).