The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sendmail help for nobody mail box draco UNIX for Advanced & Expert Users 0 03-23-2009 10:04 AM
Sendmail field mojoman UNIX for Dummies Questions & Answers 1 03-07-2009 11:01 AM
Restrict mail from Sendmail saurabh84g Linux 1 02-16-2009 11:14 AM
sendmail mail server help rcmrulzz SUN Solaris 9 05-02-2008 10:22 AM
Sendmail - forwarding mail warrend UNIX for Dummies Questions & Answers 1 12-14-2001 11:26 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-09-2009
new2ss new2ss is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 133
/usr/bin/sendmail vs /bin/mail from field

Hi all, I am logged into my linux machine as user bobby. My machine's hostname is myserver.domain.com

when i execute this command
Code:
echo "testing" | /usr/sbin/sendmail -f bobbyA@coldmail.com friend1@somemail.com
friend1@somemail.com receive the email from sender bobbyA@coldmail.com

when i execute this command
Code:
echo "testing" | /bin/mail -s "haha" "From:<bobbyA@coldmail.com>" 
friend1@somemail.com
friend1@somemail.com receive the email from sender bobby@myserver.domain.com. What should I do to make the second case reflect bobby@coldmail.com as the sender?Is there any flag i can set for mail command to send the mail out as what i specify on the command as the sender rather than the user@host executing the command?
  #2 (permalink)  
Old 07-10-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,884
Quote:
What should I do to make the second case reflect bobby@coldmail.com as the sender?
Some implementations of mail allow you to pass in sendmail options after the "to" address. So you can do:
Code:
echo "testing" | /bin/mail -s "haha" friend1@somemail.com -- -f bobbyA@coldmail.com
This actually worked on my system.
  #3 (permalink)  
Old 07-12-2009
new2ss new2ss is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 133
Hi otheus,

your command worked for me too. Thank you very much.
Reply

Bookmarks

Tags
alias, mail, sendmail

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0