My original problem was that the PHP mail() function wouldn't work for programs on my server, which is running Centos 5.5.
I have configired the firewall through a program called system-config-securitylevel-tui and the SMTP port is now open.
sendmail is installed.
I've looked in my maillog and I've got the following message:
myhost sendmail: My unqualified host name (myhost) unknown; sleeping for retry
Looking at this stackoverflow article I might need to make a change to my /etc/hosts file, but I'm not sure if my situation is the same as the above guys and I certainly don't know what I'm doing.
My hosts file looks like:
127.0.0.1 localhost localhost.localdomain 184.108.40.206 myhost (fake ip address)
From what I've read, I need to have a fully qualified domain name for the sendmail program to use.
Now I've set up my httpd webserver with the ServerName set to my domain name. How do I do the same sort of thing for the hosts file (ie how do I add the full domain name? Should the file just be:
127.0.0.1 localhost localhost.localdomain 220.127.116.11 myhost www.fulldom.tld
I don't want to run a mailserver on my server. I have a mail account set up. I just want the PHP function to work. Am I going in the right direction here do you think?