Results 1 to 2 of 2
I have a bash script that runs as root and sends an email using sendmail
When I receive the message, it comes from root. Is it possible to send the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-12-2011 #1Just Joined!
- Join Date
- Jul 2011
- Posts
- 1
Sending SENDMAIL message as another user.
I have a bash script that runs as root and sends an email using sendmail
When I receive the message, it comes from root. Is it possible to send the message from as my user account instead of root?
- 07-14-2011 #2
Something like this - worked for me.
mail -s "Test mail " -a structure.tgz toaddress@site.com -- -f fromaddr@site.com < body.txtFirst they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org


Reply With Quote

