Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change the root 'from' address from hostname

Status
Not open for further replies.

Guern

Programmer
Jun 22, 2001
91
GB
Hello,

This is an easy one I guess, but I can't seem to find out how to do it.

My system currently sends messages from 'root@system'. This is an invalid email address, so I want to to send from 'root@mydomains.com'. How do I change this without changing the hostname of the machine? There does not seem to be a way of specifying the sender with the 'mail' command.

Thanks.
 
Should have stated I'm using sendmail / fedora
 
sendmail has the "-f" (or is it -F) value when sending from command line. Application-generated outgoing mail will still use the default construct based on hostname, that's what mail does.....

Hosting Solutions for Home or Business.
 
You need to either masquerade as the domain you wish to represent or use something like the genericstable feature.

HTH
 
Masquerading seems to be the easy solution.

Thanks.
 
You could also use:
mailx -r "xx@xxx.xxx" ....


"If you always do what you've always done, you will always be where you've always been."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top