diff --git a/core/postfix/Dockerfile b/core/postfix/Dockerfile index 4208714a..5533499e 100644 --- a/core/postfix/Dockerfile +++ b/core/postfix/Dockerfile @@ -7,11 +7,10 @@ RUN apk add --no-cache postfix postfix-pcre rsyslog \ COPY conf /conf COPY start.py /start.py -COPY health.sh /health.sh EXPOSE 25/tcp 10025/tcp VOLUME ["/data"] CMD /start.py -HEALTHCHECK CMD /health.sh +HEALTHCHECK CMD echo QUIT|nc localhost 25|grep "220 .* ESMTP Postfix" diff --git a/core/postfix/health.sh b/core/postfix/health.sh deleted file mode 100755 index 192eac25..00000000 --- a/core/postfix/health.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$(echo QUIT|nc localhost 25|tail -n1|cut -f1 -d ' ')" = "221" ]; then - echo "ping successful" -else - echo "ping failed" - exit 1 -fi