bb7a748a32
CRITICAL FIXES: - Sendmail queue count extraction: Changed from 'first number' (Kbytes) to 'number after in' (message count) - Both Postfix and Sendmail now use identical extraction: grep -oE 'in [0-9]+' | grep -oE '[0-9]+' - Exim frozen detection: Only count lines starting with [frozen] marker (not all "frozen" occurrences) - Sendmail deferred detection: POSIX-compliant regex [[:space:]]* (not \s) VERIFICATION RESULTS: ✅ Exim: Correctly detects frozen message markers only ✅ Postfix: Correctly extracts message count from summary (not Kbytes) ✅ Sendmail: Now correctly extracts message count matching Postfix format ✅ All three MTAs: Properly detect frozen/suspended/deferred messages ✅ Edge cases: Empty queues, large queues, special characters, UTF-8, IP addresses ✅ POSIX compatibility: All regex patterns portable across distributions IMPROVEMENTS: - Added detailed comments explaining extraction patterns - Consistent queue count extraction for both Postfix and Sendmail - Better error handling and empty queue detection - MTA-specific help commands for troubleshooting This script is production-ready with all parsing patterns verified against real-world MTA output.