add healthcheck for postfix

This commit is contained in:
Thomas Sänger
2018-10-16 22:57:25 +02:00
parent f0f5cea5d1
commit 1fc40bf932
2 changed files with 11 additions and 0 deletions

8
core/postfix/health.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/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