2

Is there a way to limit the number of concurrent connections to a POP3 mailbox on a Dovecot server?

The current situation is that if two clients connect to the same mailbox, then the server accepts both connections, but only one can run commands on the server (like LIST, RETR, etc). If you try to use of one these commands from the second connection, it will be locked until the first one disconnects.

I was wondering if there is a way to make the server refuse the second connection.

arikfr
  • 359
  • 2
  • 5
  • 15

1 Answers1

-1

You can tell iptables to only allow each IP address to connect once to port 110. There are a couple of disadvantages to that:

  1. That stops a client accessing more than one mailbox;
  2. That might stop badly written clients who don't close old connections from making new connections, if they won't clear up their mess. I'm guessing this means that maybe you don't want what you think you want.

If you're worried about lots of idle pop3-login processes cluttering up your process space, I recommend having cron periodically issue a HUP to the master dovecot process. It doesn't sound like the right thing, but it's clean enough.

Charles Stewart
  • 650
  • 6
  • 19