Sendmail Hangs on Startup & in PHP

If Sendmail takes several minutes to start, and your PHP scripts hangs when attempting to send emails via sendmail (eg: using the mail() function), ensure that your hosts file has its host name as an alias to localhost.

For instance, your hosts file should look something like this:

[leo@crow ~]$ cat /etc/hosts               localhost.localdomain localhost                     crow

You would want to add your host name to

[leo@crow ~]$ cat /etc/hosts               localhost.localdomain localhost crow                     crow

Once that’s done, Sendmail should start and work normally.

Leave a Reply

Your email address will not be published.