Sending mail to local address crashes web server (sendmail)

Posted by deceze on Server Fault See other posts from Server Fault or by deceze
Published on 2010-05-12T02:56:27Z Indexed on 2010/05/12 3:04 UTC
Read the original article Hit count: 345

Filed under:
|

When trying to send mail automatically from a script at example.com via PHP's mail() to [email protected], the Apache server throws an Internal Error. I believe internally it is configured to use sendmail. The message gets dropped into ~/dead.letter and the general error log reads:

[Wed May 12 11:26:45 2010] [error] [client xxx.xxx.xxx.xxx] malformed header from script. Bad header=/home/example/dead.letter... S: /home/example/www/test.php

Trying any other address, not @example.com, works just fine.

I have googled and serverfaulted for solutions, but they all require to edit configuration files in /etc/mail and similar system places, which is not an option, since this problem occurs on a shared host in which I only have access to ~/.

Does anyone have a suggestion?

© Server Fault or respective owner

Related posts about sendmail

Related posts about local-delivery