Browse Source

[Postfix] Wait for DNS

andryyy 5 years ago
parent
commit
c75fd9ac40
1 changed files with 5 additions and 0 deletions
  1. 5 0
      data/Dockerfiles/postfix/postfix.sh

+ 5 - 0
data/Dockerfiles/postfix/postfix.sh

@@ -10,6 +10,11 @@ while ! mysqladmin status --socket=/var/run/mysqld/mysqld.sock -u${DBUSER} -p${D
   sleep 2
 done
 
+while ! dig dns9.quad9.net @unbound +short >/dev/null; do
+  echo "Waiting for DNS..."
+  sleep 2
+done
+
 cat <<EOF > /etc/aliases
 # Autogenerated by mailcow
 null: /dev/null