Hello. I have a web server running Centos 5.9 and Apache. One of our customers has a website that uses either PHP or Javascript to send out e-mails, but then Sendmail does not deliver it to the correct MX address. It appears as though it is ignoring the entry i have in the hosts file.
The MX server it needs to go to is on the same private subnet (192.168.190.x) as this web server, so I have the hosts file pointing mx1.domain.net to the private address.
Here are some examples detailing what I am seeing:
The hosts file shows the mx1.domain.net pointing to the correct private IP
Code:
root@fedweb etc# cat hosts
*Additional entries removed*
192.168.190.13 mx1.domain.net
And Pinging to mx1.domain.net Also brings up the correct IP address
Code:
root@fedweb etc# ping mx1.domain.net
PING mx1.domain.net (192.168.190.13) 56(84) bytes of data.
But the /var/log/maillog shows the e-mail attempting to go out to the Public IP address
Code:
Feb 21 10:06:29 fedweb sendmail[6830]: r1LI4TLF006828: to=<mmyles@domain.net>,
ctladdr=<apache@fedweb.domain.net> (48/48), delay=00:02:00, xdelay=00:02:00,
mailer=esmtp, pri=120685,
relay=mx1.domain.net. [123.456.123.456],
dsn=4.0.0,
stat=Deferred: Connection timed out with mx1.domain.net.
Is there a setting somewhere that tell Sendmail or Apache to ignore the HOSTS file?