from address using maill command
James Bourne
jbourne at hardrock.org
Thu May 7 14:29:28 UTC 2009
On Thu, 7 May 2009, nitin.gizare at wipro.com wrote:
> HI
>
> We have requirement of sending automated warning mail with from address
> option using "mail " command
>
> By default it comes with user at hostname.
>
> Can some body help? .
If it's from a script you could also use:
/usr/sbin/sendmail -t -f user at hostname << EOF
To: recipients at hostname
CC: others at hostname
From: user at hostname
Subject: Your Subject
This is the body
EOF
I find with this way, you have complete control over other parts of the
message like adding an X-Script: line to show which script or cronjob has
sent the message.
Regards
James
>
>
>
> Rgds
>
> Nitin
>
>
>
>
--
James Bourne | Email: jbourne at hardrock.org
UNIX Systems Administration | WWW: http://www.hardrock.org
Custom UNIX Programming | Linux: The choice of a GNU generation
----------------------------------------------------------------------
"All you need's an occasional kick in the philosophy." Frank Herbert
Need an inexpensive domain alternative? http://fastforwarddomains.com
More information about the redhat-sysadmin-list
mailing list