On Tue, Sep 03, 2019 at 09:40:36AM -0400, Jean-Philippe Méthot wrote:

> The error message itself hints at something more like a limit set on the
> user than a missing component. Let me paste it here again:
> 
>   unable to look up host mx.planethoster.net: Device or resource busy
> 
> The implication of this error is that the domain planethoster.info is
> resolved, but postfix is prevented from resolving the MX due to a limitation
> of some kind.

You're reading too much into rather approximate "errno" strings.
On my FreeBSD system:

    $ perl -le 'use Errno qw(:POSIX); $! = EBUSY; printf "%d: $!\n", $!;'
    16: Device busy

The only place Postfix reports "unable to look up host" is in:

    if (smtp_host_lookup_mask & SMTP_HOST_FLAG_NATIVE) {
        if ((aierr = hostname_to_sockaddr(host, (char *) 0, 0, &res0)) != 0) {
            dsb_simple(why, (SMTP_HAS_SOFT_DSN(why) || RETRY_AI_ERROR(aierr)) ?
                       (DSN_NOHOST(aierr) ? "4.4.4" : "4.3.0") :
                       (DSN_NOHOST(aierr) ? "5.4.4" : "5.3.0"),
                       "unable to look up host %s: %s",
                       host, MAI_STRERROR(aierr));
        } else {
            ...
        }
        ...
    }

This is a "native" lookup, via getaddrinfo(3), not (explicit) DNS.
The Postfix smtp(8) delivery agent normally does DNS lookups.  Do
you have "smtp_host_lookup = dns, native"?  Why???

With "native" lookups you need not only /etc/resolv.conf, but also
an "nsswitch.conf" and perhaps various "nss modules" in the chroot
jail, that are dynamically loaded.

You can find out why native resolution fails in the chroot jail,
by compiling and installing the "getaddrinfo" program, included in
"auxiliary/name-addr-test/getaddrinfo.c" with the Postfix source
code, into the chroot jail.  Then run 

    # chroot /var/spool/postfix /some/where/getaddrinfo mx.planethoster.net

and report your findings.  For extra insight (assuming it fails):

    # strace chroot /var/spool/postfix /some/where/getaddrinfo 
mx.planethoster.net

-- 
        Viktor.

Reply via email to