Forum Discussion
IMAP-S External Health monitor
Here an external health monitor to check IMAPS service. My F5 version is 17.1.1. Working successfully.
#!/bin/bash
# IMAP Health Check for F5 with IPv4-only adjustment
HOST=$(echo $1 | sed 's/::ffff://') # Force IPv4 format
PORT=993
# Capture response with error handling
response=$(echo -e "A1 CAPABILITY\nA1 LOGOUT" | /usr/bin/openssl s_client -connect "$HOST:$PORT" -crlf -ign_eof 2>&1)
# Log for debugging and check for a successful IMAP response
echo "Debug: OpenSSL response for $HOST: $response" | logger -p local0.notice -t IMAPMonitor
if echo "$response" | grep -q "OK"; then
echo "UP"
exit 0
else
echo "DOWN"
exit 1
fi
- Aswin_mkCumulonimbus
Hello ,
Do you have any queries in this or only statement?
Br
Aswin
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com