LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-23-2006, 11:29 AM   #1
spiffytech
Member
 
Registered: Dec 2005
Location: NC, USA
Distribution: (K)ubuntu
Posts: 139

Rep: Reputation: 15
Specify mail sender?


On our Linux server, we routinely send emails to clients. However, they are all from "root", because cron runs the mailing script. Is there a way to specify who the mail is from in the command line (for each message) in Linux for our scripts?
 
Old 01-23-2006, 11:40 AM   #2
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Hi

you can use a tool like "email", that allows you to set the From field.
you can also use "su":
su - user "echo test > foobar.txt"
this line will login "user", echo test in the foobar.txt file in the home of user and then log out user. So you can apply this to your mail senidng issue.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
POSTFIX how to block/delete mail from sender... hct224 Linux - Newbie 5 12-29-2009 10:11 PM
Postfix Bounce Mail To sender when error is found heero82 Linux - Software 1 10-14-2005 03:46 PM
Sendmail - wrong mail sender domain display jika Linux - Newbie 1 05-27-2005 02:29 AM
Help with Sendmail filters for outgoing mail by sender/recipient gljoe Linux - Software 18 08-12-2003 08:56 PM
Mail Error: sender domain must exist ?? _TK_ Linux - Newbie 2 02-28-2001 09:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration