dns lookup problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

dns lookup problem

zhong ming wu
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     <a href="x-apple-data-detectors://16" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="calendar-event" x-apple-data-detectors-result="16" style="-webkit-text-decoration-color: rgba(0, 0, 0, 0.258824);">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     <a href="x-apple-data-detectors://18" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="calendar-event" x-apple-data-detectors-result="18" style="-webkit-text-decoration-color: rgba(0, 0, 0, 0.258824);">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     <a href="x-apple-data-detectors://20" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="calendar-event" x-apple-data-detectors-result="20" style="-webkit-text-decoration-color: rgba(0, 0, 0, 0.258824);">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     <a href="x-apple-data-detectors://22" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="calendar-event" x-apple-data-detectors-result="22" style="-webkit-text-decoration-color: rgba(0, 0, 0, 0.258824);">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     <a href="x-apple-data-detectors://24" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="calendar-event" x-apple-data-detectors-result="24" style="-webkit-text-decoration-color: rgba(0, 0, 0, 0.258824);">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

Reply | Threaded
Open this post in threaded view
|

Re: dns lookup problem

Bastian Blank-3
On Mon, Nov 13, 2017 at 09:02:06PM -0500, zhong ming wu wrote:
> 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

Please follow http://www.postfix.org/DEBUG_README.html#mail

Please note that you must not change critical information like DNS
names.

> 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?

There is no such entries below example.com by definition, you can check
with dig yourself.

Bastian

--
There's a way out of any cage.
                -- Captain Christopher Pike, "The Menagerie" ("The Cage"),
                   stardate unknown.