How to configure a real domain name for sender address

Solution 1:

I think I have just solved it. I have the following in /etc/hosts: localhost.localdomain localhost

What I need is to place in front of the line with localhost.localdomain so that sendmail will think that it is using a real domain to send out the email.

Solution 2:

You have to configure, in your scripts, the headers of your email to have From: [email protected].