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.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th August 2010, 14: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
Quote:
[...]
-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
  #2  
Old 16th August 2010, 17: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
 
Default

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
Reply

Bookmarks

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 13:29
Postfix + postfixadmin = SMTP errors... Rashef Server Operation 4 25th June 2009 16:12
just the last step...and it works. Postfix...need help config. ubuntusr Installation/Configuration 1 5th January 2009 09:50
Filtering emails using Spamassassin and Clamav for Exchange 2000 Server Rocky Server Operation 19 11th March 2008 08:27
KErnel not showing all my memory Jorem Kernel Questions 8 13th April 2006 12:59


All times are GMT +2. The time now is 13:22.


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