Cabalmail

Host your own email and enhance your privacy

View the Project on GitHub cabalmail/cabal-infra

Runbook: IMAPAuthFailureSpike

Fired by Prometheus rule IMAPAuthFailureSpike — more than 25 Dovecot “auth failed” log lines on the imap tier in the last 5 minutes, sustained for 5 minutes.

What this means

Dovecot’s IMAP login process logged failed authentication attempts at a sustained rate of >5/min. The most common cause is a brute-force or credential-stuffing attempt against the public IMAP listener (port 993). Real users typing the wrong password rarely produce this volume.

Who/what is impacted

Failed auth attempts don’t directly affect anyone — Dovecot rejects them and the attacker moves on. The risks are:

First three things to check

  1. Where is it coming from?
    aws logs tail /ecs/cabal-imap --since 10m --filter-pattern '"auth failed"' \
      | grep -oE 'rip=[0-9.]+' | sort | uniq -c | sort -rn | head
    

    A small number of source IPs producing the bulk of attempts is a brute-force; many distinct IPs is a credential-stuffing campaign (harder to mitigate at the network layer).

  2. Is one user being targeted, or is it a username spray?
    aws logs tail /ecs/cabal-imap --since 10m --filter-pattern '"auth failed"' \
      | grep -oE 'user=<[^>]+>' | sort | uniq -c | sort -rn | head
    

    One user in particular → escalate that user’s password rotation and check whether their address is exposed publicly. Many users → spray.

  3. Are any attempts succeeding right now? Dovecot logs successful logins as imap-login: Login:
    aws logs tail /ecs/cabal-imap --since 10m --filter-pattern '"imap-login: Login"' | head -20
    

    Successful logins from the same IP-range as the failures = compromise. Treat as critical even though this alert is warning.

Escalation