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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set the "From:" field value on demand in Sendmail?

Status
Not open for further replies.

micotao

Programmer
Jun 16, 2004
33
CN
Hi, All:
When we use mailx command to send email to some specific email address, can we configure the "From:" field value? I mean, by default, the recipients will see the From: as root@<host>.<domain>, but can this be configured on our demand? Say, we don't want it to be displayed as "root@<host>.<domain>" at the recipients side, we want it to be displayed as "ROOT,<Host>" or whatever we need.
Can the "From:" field be configured on demand for sendmail in Linux/Unix? How can we do it??
Thanks!!
 
I believe there are two ways, somewhat dependent upon versions...

You should be able to set the "-F" flag on the command line.
You can also embed the "From: user@example.com" as part of the message body itself (at the top of the file of course). Don't forget to set "Reply-to: user@example.com" also!

D.E.R. Management - IT Project Management Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top