Lorenzo Bernardi: > Hi Wietse, > > Thank you for your answer. > > The docker containers are running Debian 9.3 and the postfix package > from the official Debian repository (Version: 3.1.6-0+deb9u1). > > As you can see below the source code still contains calls to > gethostbyname():
Grep does not prove that code is called. The only gethostbyname calls that are left over in the code are in src/local/biff_notify.c and in src/util/find_inet.c, and the latter is called only by the dict_mysql.c module. None of these calls are relevant for the problem at hand: hooking up Postfix with the Dovecot auth service. > Regarding the docker network, I followed the recommendations of the > official website and I'm using a user-defined network, which works with > no issue. You made a mistake somewhere, because the SYSTEM LIBRARY FUNCTION getaddrinfo() is unable to find your dovecot host unless you add it to /etc/hosts. To be totally clear about this: Postfix does not look in /etc/hosts, it is the SYSTEM LIBRARY that reads the file, as configured in the SYSTEM CONFIGURATION file /etc/nsswitch.conf. See www.postfix.org/DEBUG_README.html for how to trace a program with strace and ltrace, then you can see which call is failing and why. Wietse