Hello I am getting a dns lookup problem when I move a postfix server inside a docker container. (the sole purpose of this internal server to deliver mail for the virtual addresses. Here are the logs
Nov 11 15:32:22 hog docker/imap-in/trivial-rewrite[112]: warning: connect to pgsql server pg.example.com: could not translate host name "pg.example.com" to address: Name or service not known? Nov 11 15:32:22 hog docker/imap-in/trivial-rewrite[112]: warning: virtual_mailbox_domains: pgsql:/etc/imap-creds/domain.cf: table lookup problem Nov 11 15:32:22 hog docker/imap-in/trivial-rewrite[112]: warning: virtual_mailbox_domains lookup failure Nov 11 15:32:22 hog docker/imap-in/trivial-rewrite[112]: warning: virtual_mailbox_domains: pgsql:/etc/imap-creds/domain.cf: table lookup problem Nov 11 15:32:22 hog docker/imap-in/trivial-rewrite[112]: warning: virtual_mailbox_domains lookup failure This address is resolvable from both outside and inside the container; i can telnet 'pg.example.com' inside the container using the hostname. (If I replace the hostname with ip address, the mail gets delivered). I have a few other docker containers with special purpose postfixes running without any such dns error. Before this dns error I got the following unusual error and I suspect that this is related Nov 11 15:21:49 hog docker/imap-in/postfix-script[60]: warning: group or other writable: /usr/lib/postfix/./libpostfix-tls.so.1 Nov 11 15:21:49 hog docker/imap-in/postfix-script[61]: warning: group or other writable: /usr/lib/postfix/./libpostfix-dns.so.1 Nov 11 15:21:49 hog docker/imap-in/postfix-script[62]: warning: group or other writable: /usr/lib/postfix/./libpostfix-global.so.1 Nov 11 15:21:49 hog docker/imap-in/postfix-script[63]: warning: group or other writable: /usr/lib/postfix/./libpostfix-util.so.1 Nov 11 15:21:49 hog docker/imap-in/postfix-script[64]: warning: group or other writable: /usr/lib/postfix/./libpostfix-master.so.1 Nov 11 15:21:49 hog docker/imap-in/postfix-script[65]: warning: group or other writable: /usr/lib/postfix/./sbin/lmtp Nov 11 15:21:49 hog docker/imap-in/postfix-script[66]: warning: group or other writable: /usr/lib/postfix/sbin/./lmtp Nov 11 15:21:50 hog postfix/master[1]: daemon started -- version 3.1.0, configuration /etc/postfix I checked the postfix on other machines and the permission for these files are the same. On this container ls -l /usr/lib/postfix/ total 764 lrwxrwxrwx 1 root root 23 Oct 25 12:50 libpostfix-dns.so.1 -> libpostfix-dns.so.1.0.1 -rw-r--r-- 1 root root 26968 Oct 25 12:50 libpostfix-dns.so.1.0.1 lrwxrwxrwx 1 root root 26 Oct 25 12:50 libpostfix-global.so.1 -> libpostfix-global.so.1.0.1 -rw-r--r-- 1 root root 281152 Oct 25 12:50 libpostfix-global.so.1.0.1 lrwxrwxrwx 1 root root 26 Oct 25 12:50 libpostfix-master.so.1 -> libpostfix-master.so.1.0.1 -rw-r--r-- 1 root root 39472 Oct 25 12:50 libpostfix-master.so.1.0.1 lrwxrwxrwx 1 root root 23 Oct 25 12:50 libpostfix-tls.so.1 -> libpostfix-tls.so.1.0.1 -rw-r--r-- 1 root root 103344 Oct 25 12:50 libpostfix-tls.so.1.0.1 lrwxrwxrwx 1 root root 24 Oct 25 12:50 libpostfix-util.so.1 -> libpostfix-util.so.1.0.1 -rw-r--r-- 1 root root 264504 Oct 25 12:50 libpostfix-util.so.1.0.1 -rw-r--r-- 1 root root 18712 Oct 25 12:50 postfix-pgsql.so.1.0.1 -rw-r--r-- 1 root root 14504 Oct 25 12:50 postfix-sqlite.so.1.0.1 -rwxr-xr-x 1 root root 13052 Oct 25 12:50 postfix_groups.pl drwxr-xr-x 1 root root 4096 Nov 9 10:27 sbin pwd /usr/lib/postfix hostname 0a583f304ae6 Any insight will be appreciated. Thank you Mr Wu