# A mail client hits the connection limit

UrbeStack sysadmin note about Dovecot. Last updated 30 Nov 2026.

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

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)
```

Close any mail clients you no longer use, or lower the number of connections a client can open in its settings.

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/
```

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
```

Check that Dovecot reports the value you set.

```
doveconf -f protocol=imap -h mail_max_userip_connections
```

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.

If the problem persists after you follow this note, you can [open a support ticket](https://support.urbestack.com/new?type=support). Including the output of the commands you ran helps support diagnose the problem.
