Control: retitle -1 [chroot] postfix: Does not honor smtp_host_lookup

On Fri, 30 Jan 2015 16:08:30 -0800 Nikolaus Rath <[email protected]> wrote:
Package: postfix
Version: 2.11.3-1
Severity: normal

If I understand correctly, setting smtp_host_lookup dns,native

should allow postfix to resolve hostnames from /etc/hosts if they are
not resolvable via DNS. However, this does not seem to work in practice:

[0] root@thinkpad:/etc/postfix# grep lookup main.cf smtp_host_lookup = dns,native

[0] root@thinkpad:/etc/postfix# /usr/sbin/postfix reload
postfix/postfix-script: refreshing the Postfix mail system

[0] root@thinkpad:/etc/postfix# echo test | mailx [email protected]

[0] root@thinkpad:/etc/postfix# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
D617DC0AE3      266 Sat Jan 31 00:07:23  [email protected]
(Host or domain name not found. Name service error for name=ebox type=A: Host 
not found, try again)
                                         [email protected]

-- 0 Kbytes in 1 Request.

[0] root@thinkpad:/etc/postfix# ping ebox
PING ebox (192.168.12.1) 56(84) bytes of data.
64 bytes from ebox (192.168.12.1): icmp_seq=1 ttl=64 time=15.7 ms
Hi!

This looks like yet another incarnation of the chroot-by-default postfix
setup in debian.  With no /etc/hosts available in the chroot jail where
smtp client is running (which is /var/spool/postfix/), native dns lookup
does not work.

So it is not like smtp_host_lookup isn't honored, but /etc/hosts don't
work in chroot.

This bug report is almost 10 years old, - but the solution would be to
un-chroot smtp (and relay) transports in master.cf.

Thanks,

/mjt

Reply via email to