LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-23-2011, 12:20 AM   #1
hydraMax
Member
 
Registered: Jul 2010
Location: Skynet
Distribution: Debian + Emacs
Posts: 467
Blog Entries: 60

Rep: Reputation: 51
Postfix DNS: Why does it not check my hosts file?


I run a few virtual servers at home behind a NAT, including an e-mail server, with dynamically updated dns records pointing to each of the servers. Consequently, I suffer from the loopback problem when working with these servers from my desktop PC. (E.g., I ping one of the dns hostnames and the ping goes to my router instead of the server). I fixed this problem by manually adding the in-home IP addresses and name pairs to my /etc/hosts, and then setting /etc/host.conf to a "hosts, bind" order.

This seems to work for every application on my desktop except for one: the postfix installation on my desktop PC (used for mailing smartctl messages and so forth) cannot communicate with my in-home e-mail server (times out). I checked the logs, and it looks like it is trying to use the IP address from the actual A-RECORD, rather than the address in my hosts file.

So I'm not quite sure what to do. There seems to be a "proxy_interfaces" parameter in main.conf which might be relevant, but I think it only deals with received mail. I'd prefer to have the mail going to that e-mail server, rather than also having to check the spool on my local desktop accounts.
 
Old 03-23-2011, 01:33 AM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
more likely, the "problem" is that postfix is using the MX record. it falls back to the A record when MX isn't available.
Quote:
So I'm not quite sure what to do.
you can override MX lookups with a transport table or its variants. but, a better solution might be to have the router do a destination address rewrite (when an in-LAN machine accesses another in-LAN machine using its external IP), or even to run an in-LAN DNS server having the private addresses.

Last edited by Berhanie; 03-23-2011 at 01:47 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to setup reverse dns check in Postfix ( CENTOS 5 ) ? dlugasx Linux - Server 1 11-04-2009 08:51 AM
Can I use my /etc/hosts file as a person DNS server? trist007 Linux - Newbie 8 03-23-2009 05:58 PM
DNS doesn't resolv hosts that are on internal DNS Tux-Slack Linux - Networking 8 06-03-2008 07:42 AM
Starting postfix: Postfix integrity check failed! Leirith Linux - Software 2 01-02-2008 10:55 PM
postfix with /etc/hosts, /etc/hostname file setting taiwf Linux - Newbie 1 05-24-2006 11:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration