Files
dms-knusperkerne/tools/test_imaps_login.sh
2025-11-20 22:32:15 +01:00

17 lines
433 B
Bash
Executable File

#!/usr/bin/env bash
# Usage: ./test_imaps_login.sh <server> <email> <password>
# Example: ./test_imaps_login.sh mailsystem.knusperkerne.de postmaster@knusperkerne.de PASSWORT
SERVER="$1"
USER="$2"
PASS="$3"
if [ -z "$SERVER" ] || [ -z "$USER" ] || [ -z "$PASS" ]; then
echo "Usage: $0 <server> <email> <password>"
exit 1
fi
echo -e "a LOGIN $USER $PASS\r\na LOGOUT\r\n" | \
openssl s_client -connect "$SERVER:993" -quiet