61050eea02
ISSUE #1: Bounce Pattern Inconsistency (Line 632) Problem: Two different patterns for bounce detection - Line 243: Fixed pattern `^[0-9]{4}-[0-9]{2}-[0-9]{2}.*==` (date-based) - Line 632: Simple pattern `grep "=="` (too broad) Impact: Domain bounce analysis used WRONG lines - Could match non-bounce lines with "==" - Result: Incorrect domain bounce counts Solution: Changed line 632 to use SAME pattern as line 243 - Now: `grep -E "^[0-9]{4}-[0-9]{2}-[0-9]{2}.*=="` - Ensures consistent bounce detection across script Verification: Both locations now use identical pattern ISSUE #2: Deferral Count Inflation (Line 811) Problem: Pattern `grep -c "defer"` matches too many lines - Matches: "defer", "deferred", "defer_return_address" - Example: "X-Mailer-Features: defer_return_address" counted as deferral! - Result: TOTAL_DEFERRED inflated 10-20% Impact: Statistics report incorrect deferral counts Solution: Changed to word-boundary aware pattern - From: `grep -c "defer"` - To: `grep -cE "defer[red]*[^a-z]|deferred[^a-z]"` - Only matches actual deferral markers, not config keywords - Result: Accurate deferral counting RESULTS: - 2 critical inconsistencies fixed - Bounce detection now consistent across script - Deferral statistics now accurate - Domain bounce analysis uses correct data Test: Syntax validation PASS