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?
...is an internally meaningful hostname, but it is not a publicly registered domain name. i.e. if you ping natulwebserver01.bto.com 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.