View previous topic :: View next topic |
Author |
Message |
pointers Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Southpark/avatar20.gif)
Joined: 18 Apr 2004 Posts: 123
|
Posted: Wed Jan 04, 2006 8:57 am Post subject: dnslookup order hosts,bind - hosts file is not read |
|
|
Hi,
My entries in /etc/hosts file are not used by my resolver. Here is my /etc/host.conf and nsswitch.conf files
host.conf
nsswitch.conf
Quote: | hosts: files dns
networks: files dns
|
#strace host domain.com
doesnt show any evidence such that resolver looks at /etc/hosts file. Permissions are ok.
What can be the problem ?
Thanks a lot.[/quote] |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fvant Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 08 Jun 2003 Posts: 328 Location: Leiden, The Netherlands
|
Posted: Wed Jan 04, 2006 9:06 am Post subject: |
|
|
Is an nss cache running, such as nscd? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pointers Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Southpark/avatar20.gif)
Joined: 18 Apr 2004 Posts: 123
|
Posted: Wed Jan 04, 2006 9:09 am Post subject: no nss |
|
|
Hi it is not running,
here is the rc-status
Quote: |
Runlevel: default
local [ started ]
netmount [ started ]
syslog-ng [ started ]
vixie-cron [ started ]
domainname [ started ]
net.eth0 [ started ]
sshd [ started ]
postfix [ started ]
apache2_chroot [ started ]
mysql [ started ]
snmpd [ started ]
ntp-client |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Katphish Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 05 Dec 2005 Posts: 155
|
Posted: Wed Jan 04, 2006 9:14 am Post subject: |
|
|
Hi,
It is working. Try to ping a name that is in your host file.
The `host` command is a DNS tool according to the man page. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pointers Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Southpark/avatar20.gif)
Joined: 18 Apr 2004 Posts: 123
|
Posted: Wed Jan 04, 2006 9:19 am Post subject: ping |
|
|
ping looks at /etc/hosts file ok. But Before host command was using /etc/hosts file too, my aim is to
to tell some of the entries in /etc/hosts into the postfix but postfix does not look at this file and directly use resolv.conf
According to postfix documents if order in host.conf or nsswitch.conf files are like mine,
then postfix should look at hosts file. Before postfix was using this file now it isnt.
I dont know what the problem is:( |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Katphish Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 05 Dec 2005 Posts: 155
|
Posted: Wed Jan 04, 2006 9:47 am Post subject: |
|
|
What are you trying to do with postfix? Route mail locally?
It might be worth setting up a DNS server if you have a few machines. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pointers Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Southpark/avatar20.gif)
Joined: 18 Apr 2004 Posts: 123
|
Posted: Wed Jan 04, 2006 9:51 am Post subject: local mail |
|
|
Hi,
It is just a simple entry and I dont want to use dns for this purpose. I just would like to fix this problem on the postfix side.
Now I am using a simple routing solution.
Thanks for your helps friend I will try to find it. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xglad n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/93482499044b326264001d.jpg)
Joined: 13 Aug 2002 Posts: 53 Location: Ft. Lauderdale, FL, USA.
|
Posted: Tue Feb 07, 2006 8:31 pm Post subject: |
|
|
I've got this same problem. Same circumstances as the OP. No nscd, same stuff in host.conf and nsswitch.conf.
<edit>
See the smtp_host_lookup in $ man 5 postconf. The possible values seem a little half-baked (there is no native,dns order apparently), but for pure /etc/hosts usage, this fixes my problem.
</edit> |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|