Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to debug a problem with sending mail on a Red Hat/Apache server. When I send email from the command line using sendmail -t, I get bounce-back emails with messages like this:

The original message was received at Thu, 7 Apr 2011 10:24:56 -0500
from []

   ----- The following addresses had permanent fatal errors -----

   ----- Transcript of session follows -----
<>... Deferred: Connection timed out with
Message could not be delivered for 5 days
Message will be deleted from queue

Content-Type: message/delivery-status

Reporting-MTA: dns;
Arrival-Date: Thu, 7 Apr 2011 10:24:56 -0500

Final-Recipient: RFC822;
Action: failed
Status: 4.4.7
Remote-MTA: DNS;
Last-Attempt-Date: Tue, 12 Apr 2011 11:06:54 -0500

That timeout talking to is likely the cause of the problem. BUT, it has been suggested that this particular timeout was caused because sending the test email from the command line caused the local MTA to identify itself using the name "", causing the remote MTA to reject the message because it didn't recognize our interal-only DNS.

The original problem was identified when some PHP scripts on the server started failing to send mail correctly. Those scripts are accessed through a web browser (obviously) using a valid external name for the server.

So basically, I want to check the apache user's local mail spool to see if there are bounce emails there that would take the internal/external name thing out of the equation and possibly shed some more light on the matter. Is that possible? Does the apache user even HAVE a mail spool?

I tried sending some mails with the Return-Path header set to an email address I control ... but since the whole problem is that the server can't send email right, that didn't work.

share|improve this question
up vote 0 down vote accepted

Check if /var/spool/mail/<apache user> exists, it's the mail file. You can read it with a text editor or you can configure mutt to check it locally (change the $SPOOLFILE environment variable to make it check a file other than the default.

EDIT: I am not sure if Red Hat's mail spool is /var/spool/mail, so you may have to poke around to confirm it.

share|improve this answer
Red Hat's mail spool is indeed at /var/spool/mail -- I found the spool for my own user there. Sadly, there's nothing for the apache user on this system, but now I know where to look. Thanks. – Will Martin Apr 13 '11 at 1:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.