Postfix in Docker container can't resolve MX unless it gets restarted once -


I have a problem with a postfix example in the Docker Container, to ensure the services running in the background Supervisor . However, if I create the image, start it for the first time and try sending the mail, the postfix complains that it resolves the MX record for the given address Can not ( status = deferred (host or domain) Program not) Name = domain.tld type = mx name service error: can not be found, try again host) ).

Now I have installed the excavator to find out if it is a DNS issue, but I can solve the MX directly:

  $ dig mx domain TLD + short 90 apm x2.googlemail.com 90 aspmx3.googlemail.com 10 aspmx.l.google.com 50 alt1.aspmx.l.google.com 50 alt2.aspmx.l.google. Com  

Then I proceeded to restart the postfix with the service postfix restart and it was quite startled that the MX problem has ended. Issues to be presented more than three times again and it is always the same. To make postfix work fully functional, I must issue resume service postfix

Why can someone explain me or better: How to fix it?

Thanks in advance!

When I tried to install Postfix on a fusion / basement, I went to the same issue, Which replaces Ubuntz init.d system with runtext if you issue "service postfix resume", still runs the postfix script in /etc/init.d, which does a lot in return which I do not Understands One of them is to copy a bunch of files from / etc / var / spool / postfix / etc, which includes resolv.conf, this problem was fixed for me to copy this file, thus your run In the script, ($ /etc/init.d/postfix taken from)

  FILES = "local time services for resolv.conf host nsswitch.conf nss_mdns.config" for $$ file Files; A + rx / var / spool / postfix / etc / $ {file} div in the  

Comments