Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 am trying to diagnose why email won't send from a new RHEL v5.8 server. Sendmail is up and running, but everything is stuck in the queue (confirmed with mailq) with connection timed out errors.

If I have the hostname of the server to:

But try to send emails with PHP and set the 'from' email address to:

...this would cause the destination mail servers to block the emails right?

If so, does that mean the email address I set as a 'from' address in the PHP mail() function would have to match the server hostname exactly? For example:

I have tried that and it doesn't work, but I want to ask just to confirm in theory.

Also - and maybe this is the real cause - does the hostname need to resolve to the IP address of the server in the destination mailserver's DNS before it will accept emails from it?

For example: an internally meaningful hostname, but it is not a publicly registered domain name. i.e. if you ping it will not return the IP address of the server.

Does it make sense that the destination mailservers would block email from my server as it is reporting a hostname that cannot be verified with DNS?

*I have modified the actual hostnames/domains involved for the purposes of this question.

share|improve this question
up vote 2 down vote accepted

The domain in the 'From' address need not be the same as the hostname of the smtp server, but the hostname should be publicly registered and match reverse DNS of the IP on which sendmail is running.

share|improve this answer
Thank you Tatul. Is it the full subdomain that needs to be registered, like '', or just '' would be enough for the validation? – dabayl Apr 23 '12 at 17:01
You'll want to add an MX record for the subdomain, I believe. – JohnThePro Apr 23 '12 at 17:06
Ok I tried it and it worked without the full '' hostname needing to be registered - just the '' was enough. – dabayl Apr 23 '12 at 17:44

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.