I run three Magento web stores. All the orders e-mails are working just fine, with the exception of 7 e-mails that didn't even got sent from the webserver. Upon investigating the issue I discovered the following logs:
Magento log:
2013-08-08T11:44:59+00:00 ERR (3):
exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. ' in /var/www/website.com/lib/Zend/Mail/Transport/Sendmail.php:137
Postifx log:
Aug 8 12:44:59 bv-webserver postfix/sendmail[18647]: fatal: sales@website.com(33): No recipient addresses found in message header
Aug 8 12:44:59 bv-webserver postfix/postdrop[18648]: fatal: uid=33: malformed input
This is very strange, because hundreds of e-mails were sent just fine and only these 7 got this exception. In some cases the clients just purchased again from the store and then received the e-mail as expected.
I thought it could be a resource problem. But I run the newrelic agent and the server is at 20% load at most during peak hours (both memory and processors).
Edit: Forgot to mention, I run nginx with php-fpm.
You'll always have an issue if you try to send emails without a recipient address. Postfix is telling you:
8 12:44:59 bv-webserver postfix/sendmail[18647]: fatal: sales@website.com(33): No recipient addresses found in message header
Fix that and you should be Ok.
You might need to look into why the application apparently lost the email addresses for the seven transactions in question.