LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   /bin/mail command (https://www.linuxquestions.org/questions/linux-software-2/bin-mail-command-116733/)

pk21 11-16-2003 01:25 PM

/bin/mail command
 
how can i change the sender address which is used for example when i do:

echo test|mail test@example.com -s "subject"

I always get root@localhost when im logged in as root.

trickykid 11-16-2003 01:53 PM

Change your hostname and domain name for your machine. Username will depend on the user account your logged in as.

pk21 11-16-2003 03:00 PM

But isnt there a command line option to override this?
I run a script as a certain user, and it should mail me as a different one and i can't change to another user for this.

trickykid 11-16-2003 06:00 PM

Quote:

Originally posted by pk21
But isnt there a command line option to override this?
I run a script as a certain user, and it should mail me as a different one and i can't change to another user for this.

I don't understand what your trying to really accomplish here.. a command? Are you referring to the 'su' command?


All times are GMT -5. The time now is 01:36 PM.