How can I have Postfix use /etc/hosts before doing a DNS lookup?
Posted on 2008-10-01
I have in /etc/hosts:
10.0.0.9 burritos burritos.domain.com
If I ping burritos.domain.com I get 10.0.0.9. I can also telnet burritos 25 and I can deliver mail through mail from, rcpt to, data commands.
I have Postfix configured to deliver mail for @domain.com locally, but it forwards mail for @burritos.domain.com to server burritos.
The problem is Postfix does a DNS lookup regardless. It does not look into /etc/hosts. I don't have an A record for burritos.domain.com because I want it to only receive mail internally. I don't run a DNS server internally (which could obviously fix the problem, but is more complication than I'd like.)
I don't want to disable DNS lookups entirely. I just want for Postfix to check /etc/hosts first. Is that possible?