Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 14th August 2010, 15:24
dpicella dpicella is offline
Senior Member
Join Date: Apr 2009
Posts: 116
Thanks: 9
Thanked 8 Times in 7 Posts
Default How to send mail from linux shell as another user

Using the root account, I would like to send some routine emails to my users from the shell using a different default email so that if a user replies it does not go to root@myhostingdomain

I recently changed from Fedora to Cent OS. I noticed the "mail" command in CentOS does not have to -r option that is available in Fedora.

# man mail
-r address
Sets the From address. Overrides any from variable specified in
environment or startup files. Tilde escapes are disabled. The
-r address options are passed to the mail transfer agent unless
SMTP is used. This option exists for compatibility only; it is
recommended to set the from variable directly instead.
Is there a better way to do this?
Reply With Quote
Sponsored Links
Old 16th August 2010, 18:15
BorderAmigos BorderAmigos is offline
Senior Member
Join Date: Apr 2008
Location: San Diego & Tijuana
Posts: 302
Thanks: 26
Thanked 33 Times in 31 Posts
Send a message via MSN to BorderAmigos Send a message via Yahoo to BorderAmigos

You could do it with the php mail command. Set up a small php script that sends your mails then run it from the command line.
System6Hosting.com, ISPConfig 3, Debian.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't access to my website - after install problem pallermo Installation/Configuration 18 4th June 2010 14:29
Postfix + postfixadmin = SMTP errors... Rashef Server Operation 4 25th June 2009 17:12
just the last step...and it works. Postfix...need help config. ubuntusr Installation/Configuration 1 5th January 2009 10:50
Filtering emails using Spamassassin and Clamav for Exchange 2000 Server Rocky Server Operation 19 11th March 2008 09:27
KErnel not showing all my memory Jorem Kernel Questions 8 13th April 2006 13:59

All times are GMT +2. The time now is 05:58.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.