homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

setting 'from' when sending mail from shell
When sending an email from command line or shell, can I set 'from'?

 6:21 pm on Nov 5, 2002 (gmt 0)

I have a script that backups a database, gzips it, moves it, and sets some chmod permissions. Then, a copy of the archive is mailed to me. But the 'from' email address is always set to root. I'd like to change it, but I don't see a parameter to set it. Has anyone come up with something?



 7:01 pm on Nov 5, 2002 (gmt 0)

From 'man sendmail':

-f <address>
Set the address of the sender of a locally-generated message.
This option can normally be used only by root or the Exim user
or by one of the configured trusted users. However, anyone may
use it when testing a filter file with -bf or when testing or
verifying addresses using the -bt or -bv options. In other
cases, the sender of a local message is always set up as the
user who ran the exim command, and -f is ignored, with one
exception. If the special setting -f <> is used by an untrusted
user, it does not affect the sender for the purposes of managing
the Sender: and From: headers, but it does have the effect of
causing any SMTP transmissions to be sent out with ...


 7:06 pm on Nov 5, 2002 (gmt 0)

58sniper - the parameters are different based on the Unix platform you are using and whether you are using mail, mailx, or sendmail


 7:54 pm on Nov 5, 2002 (gmt 0)

My mistake. I'm using mail. Just a simple command line send of a file. It's no big deal, really. Just an aestetics thing....

If it can't be done, I'll live with it.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved