Welcome to WebmasterWorld Guest from 54.226.22.192

Forum Moderators: bakedjake

Message Too Old, No Replies

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)

New User

10+ Year Member

joined:Sept 20, 2002
posts:28
votes: 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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 12, 2002
posts:885
votes: 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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 16, 2001
posts:2006
votes: 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)

New User

10+ Year Member

joined:Sept 20, 2002
posts:28
votes: 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.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members