Getting Postfix to use /etc/hosts file

I have a mail server on a LAN and other servers on the same LAN have trouble sending to local addresses because they resolve the mail server to the public ip address but then can’t get there. To fix this, I tried putting the mail server hostname and LAN ip into the /etc/hosts file, but frustratingly, postfix insists on not using the hosts file. I searched around and found the solution here

My config now is :

Code:
lmtp_host_lookup = native
smtp_host_lookup=native
#disable_dns_lookups = yes
ignore_mx_lookup_error = yes

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *