r-raymond / nixos-mailserver

A complete and Simple Nixos Mailserver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dovecot's default connections per ip is a bit low

phdoerfler opened this issue · comments

SNM Version: current master

Nixos Version: 17.09-stable-small

$ dovecot -a | grep userip
mail_max_userip_connections = 10

I think we can safely bump this up to say 64 or 128 or make it configurable. The configuration in dovecot is there to prevent abuse. Something which won't happen on a personal mailserver that is just used by one person.
The default value of 10 is low enough to run into problems with mail clients such as thunderbird who default to using 5 connections with IMAP.
So between your phone, your tablet, your notebook and then some other machine running thunderbird the 10 simultaneous connections allowed by dovecot are quickly exhausted and do result in annoying errors in the mail clients when dovecot decides to close these connections.
This results in the mail server being labeled als defective in some way. Thunderbird bothers the user with notifications, Apple Mail marks the server with a little flash icon indicating it is no longer reachable and so on. And this happens in a not very obvious way to the user. For instance in Thunderbird, clicking on individual mailboxes opens new connections and you find that after say the third mailbox you look at your connection is gone all of a sudden.

In short:

protocol imap {
mail_max_userip_connections = 64
...

or a configuration option, preferably with a high default value. Because really, it is 2018 and irritated mail clients are far more annoying then a few bytes of RAM on the server being used to maintain these connections.

I'm all for it!