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

add domain to sender address 1

Status
Not open for further replies.

fugtruck

MIS
Jul 1, 2009
62
US
I have a PHP application that sends email reports. The script runs under the account some_user and the email message arrives as being from some_user without a "@domain" suffix. The server is running sendmail as an MTU. Can sendmail be configured to add the domain suffix to the sender prior to sending the message?
 
You can do this by editing the /etc/sendmail.cf file. Then you need to stop and start sendmail to take effect!

Code:
service sendmail restart

Have a look at these links which will explain for you all you need to know about sendmail:




Regrads,
Khalid
 
Yet a simpler solution to your case! Editing /etc/hosts:

Code:
The /etc/hosts File 
The /etc/hosts file also is used by DNS clients and also needs to be correctly configured. Here is a brief example of the first line you should expect to see in it: 

127.0.0.1 bigboy.my-site.com localhost.localdomain localhost bigboy
The entry for 127.0.0.1 must always be followed by the fully qualified domain name (FQDN) of the server. In the case above it would be bigboy.my-site.com. Then you must have an entry for localhost and localhost.localdomain. Linux does not function properly if the 127.0.0.1 entry in /etc/hosts doesn't also include localhost and localhost.localdomain. Finally you can add any other aliases your host may have to the end of the line.

Regards,
Khalid
 
fugtruck, why don't you give them a star. That's how it's done here (in addition to saying "Thank You"). Just click the link under the post you are grateful for that says "Thank <name> for this valuable post!". Then follow the prompts.


 
Thanks Fugtruck and SamBones for my first star in this forum :)

Regards,
Khalid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top