Get your free beta license ↗
Mail · Dovecot

A mail client hits the connection limit

Last updated 30 Nov 2026
Summary

A mail client is refused when the mail account already has too many connections from the same IP address. You can check the open connections and raise the Dovecot limit.

Symptoms

Some folders stop loading, or one of several devices loses its connection. The server refuses the connection that exceeds the limit with the following message.

Output
[UNAVAILABLE] Maximum number of connections from user+IP exceeded (mail_max_userip_connections=20)

Cause

UrbeStack allows up to 20 IMAP connections and 10 POP3 connections per mail account from one IP address.

An IMAP client opens several connections, often one for each folder it watches. Phones and computers that use the same mail account from one office IP address share the limit.

Resolution

  1. Check the mail account's connections and the IP addresses they come from.

    doveadm who user@example.com
    Output
    username         # proto (pids)           (ips)
    user@example.com 3 imap  (4443 4445 4447) (203.0.113.10)
  2. Close any mail clients you no longer use, or lower the number of connections a client can open in its settings.

  3. To raise the limit, change UrbeStack's Dovecot template. UrbeStack writes /etc/dovecot/dovecot.conf and overwrites direct edits. Copy the template into the overrides folder to keep your edits across updates.

    cp /usr/local/urbestack/templates/dovecot.conf.tmpl /usr/local/urbestack/overrides/
  4. In the copy, change mail_max_userip_connections = 20 in the protocol imap block to the limit you want. Then render the configuration again.

    urbestack-rebuild
  5. Check that Dovecot reports the value you set.

    doveconf -f protocol=imap -h mail_max_userip_connections
  6. The copy takes precedence over the original template, including after updates. To go back to UrbeStack's template, delete the copy and run urbestack-rebuild again.