|
|
@ -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 |
|
|
|