Skip to content
Module 11 · Lesson 22 of 25

Anvil and connection limits

Part of Dovecot: IMAP/POP3 at Production Scale, in the Security Hardening & Audit Logging module.

Author

anvil tracks per-user and per-IP connection counts so a single malicious or buggy client can't exhaust your process pool.

Recommended limits in local.conf:

mail_max_userip_connections = 20

20 concurrent IMAP connections per (user, IP) pair. Most clients use 1–5; 20 catches bugs without breaking mail.

Per-service caps:

service imap-login {
  process_limit = 1000
  service_count = 1
}
service imap {
  process_limit = 1024
}

Watch the metrics:

doveadm stats dump | grep "auth"

Sustained auth failures from a single IP are usually credential stuffing. Feed those IPs to fail2ban.

Sign in to keep track of what you have read.

Pulse · email sending

Sending infrastructure that is yours alone.

Every domain gets its own MX host, IP, DKIM selector and certificate. Take it managed, and we run it for you, or buy a licence and run it on your own servers.

# on a fresh Ubuntu server
$ cd pulse && sudo ./install.sh
→ docker compose up · kumomta · stalwart · caddy
→ dashboard ready on https://pulse.yourdomain.com
$

Also from us:Beat: monitoring that tells you the fixConsulting: $65/hr, no retainer