From: Bratyakin Sergey <sergey@zorya.com.ua>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] Postfix in chroot can't resolv client name in ALT Server 4.0.1
Date: Thu, 20 Mar 2008 09:24:36 +0200
Message-ID: <47E21134.8000805@zorya.com.ua> (raw)
In-Reply-To: <20080320093205.1689c3a1@blackp.vop.mes>
Peter Evdokimov пишет:
> On Thu, 20 Mar 2008 07:44:48 +0200
> Bratyakin Sergey wrote:
>
>> Заработало.
>> Сделал следующее
>> в /etc/nsswitch.conf
>> заменил строку
>> hosts: files nisplus nis dns
> странно. у меня так и в чруте тоже. только на сизифе. и всё работает.
>
>> на
>> hosts: dns files
>> Обновил окружение update_chrooted conf
>> Если прописать так
>> hosts: files dns
>> то перестает определять имена.
>> Странно.
>
>
> sy,
> peter
> _______________________________________________
> Sysadmins mailing list
> Sysadmins@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/sysadmins
Это не первый сервер который настраивал и который администрирую.
Еще есть сервера Master 2.4, есть и Сизиф.
и везде без проблем,
только с этим странная проблема
Я было даже обрадовался что нашел в чем проблема. (Писал раньше про еще
один ентер в hosts)
Но после перестарта postfix при настройке hosts: files dns
он PTR запросы не делает.
Сейчас hosts: dns files - запросы идут
Вот такая странность.
Если интересно прикладываю вывод strace -p pid
При hosts: dns files видно обращение сперва к DSN 127.0.0.1 и потом
смотрит файл hosts
getpeername(11, {sa_family=AF_INET, sin_port=htons(2883),
sin_addr=inet_addr("89.186.118.49")}, [16]) = 0
geteuid32() = 42
getuid32() = 42
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 22
connect(22, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("127.0.0.1")}, 28) = 0
fcntl64(22, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(22, F_SETFL, O_RDWR|O_NONBLOCK) = 0
gettimeofday({1205996232, 463949}, NULL) = 0
poll([{fd=22, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
send(22, "\vc\1\0\0\1\0\0\0\0\0\0\00249\003118\003186\00289\7in-"...,
44, MSG_NOSIGNAL) = 44
poll([{fd=22, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
ioctl(22, FIONREAD, [104]) = 0
recvfrom(22,
"\vc\201\203\0\1\0\0\0\1\0\0\00249\003118\003186\00289\7"..., 1024, 0,
{sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 104
close(22) = 0
open("/etc/hosts", O_RDONLY) = 22
fcntl64(22, F_GETFD) = 0
fcntl64(22, F_SETFD, FD_CLOEXEC) = 0
fstat64(22, {st_mode=S_IFREG|0644, st_size=116, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fc9000
read(22, "127.0.0.1\tlocalhost.localdomain "..., 4096) = 116
read(22, "", 4096) = 0
close(22)
При hosts: files dns выглядит так и видно что вызов getpeername
только просматривает файл hosts
getpeername(11, {sa_family=AF_INET, sin_port=htons(18689),
sin_addr=inet_addr("193.252.22.22")}, [16]) = 0
geteuid32() = 42
getuid32() = 42
open("/etc/hosts", O_RDONLY) = 20
fcntl64(20, F_GETFD) = 0
fcntl64(20, F_SETFD, FD_CLOEXEC) = 0
fstat64(20, {st_mode=S_IFREG|0644, st_size=115, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f79000
read(20, "127.0.0.1\tlocalhost.localdomain "..., 4096) = 115
read(20, "", 4096) = 0
close(20) = 0
munmap(0xb7f79000, 4096) = 0
open("/var/nis/NIS_COLD_START", O_RDONLY) = -1 ENOENT (No such file or
directory)
uname({sys="Linux", и т.д.
prev parent reply other threads:[~2008-03-20 7:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-19 5:57 Bratyakin Sergey
2008-03-19 6:16 ` Vladimir V. Kamarzin
2008-03-19 7:05 ` Bratyakin Sergey
2008-03-19 9:14 ` Vladimir V. Kamarzin
2008-03-19 10:02 ` Bratyakin Sergey
2008-03-19 7:14 ` Bratyakin Sergey
2008-03-19 10:07 ` Dmitry V. Levin
2008-03-19 10:21 ` Bratyakin Sergey
2008-03-19 10:26 ` Dmitry V. Levin
2008-03-19 10:55 ` Bratyakin Sergey
2008-03-19 11:28 ` Vladimir V. Kamarzin
2008-03-19 12:15 ` Bratyakin Sergey
2008-03-20 5:44 ` Bratyakin Sergey
2008-03-20 5:53 ` Dmitry V. Levin
2008-03-20 6:25 ` Bratyakin Sergey
2008-03-20 6:32 ` Peter Evdokimov
2008-03-20 7:24 ` Bratyakin Sergey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47E21134.8000805@zorya.com.ua \
--to=sergey@zorya.com.ua \
--cc=sysadmins@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git