Sendmail

From Leo's Notes
Revision as of 02:13, 12 September 2019 by Leo (talk | contribs) (Import WP content from http://leo.steamr.com/2010/07/sendmail-hangs-on-startup-in-php/)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 12 September 2019, at 02:13.

Troubleshooting

Sendmail Hangs on Startup

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
127.0.0.1               localhost.localdomain localhost
109.169.59.122                     crow

You would want to add your host name to 127.0.0.1:

[leo@crow ~]$ cat /etc/hosts
127.0.0.1               localhost.localdomain localhost crow
109.169.59.122                     crow
Once that’s done, sendmail should start and work normally.