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 internal.example.edu [127.0.0.1] ----- The following addresses had permanent fatal errors ----- <firstname.lastname@example.org> ----- Transcript of session follows ----- <email@example.com>... Deferred: Connection timed out with mail.global.frontbridge.com. Message could not be delivered for 5 days Message will be deleted from queue --p3CFqmnx022071.1302624414/internal.example.edu Content-Type: message/delivery-status Reporting-MTA: dns; internal.example.edu Arrival-Date: Thu, 7 Apr 2011 10:24:56 -0500 Final-Recipient: RFC822; firstname.lastname@example.org Action: failed Status: 4.4.7 Remote-MTA: DNS; mail.global.frontbridge.com Last-Attempt-Date: Tue, 12 Apr 2011 11:06:54 -0500
That timeout talking to
mail.global.frontbridge.com 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 "internal.example.edu", 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.