|
@ -23,9 +23,9 @@ EOF |
|
|
function check_smtp_connection { |
|
|
function check_smtp_connection { |
|
|
echo -n "check smtp server <$server> port 587 ... " |
|
|
echo -n "check smtp server <$server> port 587 ... " |
|
|
if connect_server | grep -q CONNECTED; then |
|
|
if connect_server | grep -q CONNECTED; then |
|
|
echo SUCCESS |
|
|
|
|
|
|
|
|
echo SUCCESSFUL CONNECTION |
|
|
else |
|
|
else |
|
|
echo FAILURE && exit 1 |
|
|
|
|
|
|
|
|
echo wrong server connection! && exit 1 |
|
|
fi |
|
|
fi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -35,7 +35,7 @@ function check_smtp_auth { |
|
|
output=$(auth_server) |
|
|
output=$(auth_server) |
|
|
if echo "$output" | grep -q CONNECTED; then |
|
|
if echo "$output" | grep -q CONNECTED; then |
|
|
if echo "$output" | grep -q "Authentication successful"; then |
|
|
if echo "$output" | grep -q "Authentication successful"; then |
|
|
echo OK |
|
|
|
|
|
|
|
|
echo SUCCESSFUL AUTHENTICATION |
|
|
else |
|
|
else |
|
|
echo wrong username or password! && exit 2 |
|
|
echo wrong username or password! && exit 2 |
|
|
fi |
|
|
fi |
|
|