Browse Source

timeout 2

main
pvincent 7 months ago
parent
commit
ad7f4b6d13
  1. 3
      scripts/smtp-check

3
scripts/smtp-check

@ -6,7 +6,7 @@ function usage {
}
function connect_server {
openssl s_client -starttls smtp -connect "$server:587" -ign_eof 2>/dev/null <<EOF
timeout 2 openssl s_client -starttls smtp -connect "$server:587" -ign_eof 2>/dev/null <<EOF
quit
EOF
}
@ -22,6 +22,7 @@ EOF
function check_smtp_connection {
echo -n "check smtp server <$server> port 587 ... "
set +e
if connect_server | grep -q CONNECTED; then
echo SUCCESSFUL CONNECTION
else

Loading…
Cancel
Save