For Changing the Default sender mail address (the default address like root@ubuntu.com) in mailx, use the following syntax
Syntax:-mailx -s "Subject" To Mail Address -- -r From Mail Address
The Usage info shows "[-- sendmail-options ...]" and since "-r" is a sendmail option, you need to use the double dashes first.
Eg:- mailx -s 'Disk Space Alert' itteam@gmail.com -- -r ictops@aerl.in << EOF
Eg:- mailx -s 'Disk Space Alert' itteam@gmail.com -- -r ictops@aerl.in << EOF
No comments:
Post a Comment