mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
13.89k stars 1.43k forks source link

Connection to Storage Server Failed - persists across installs and MIAB versions #2438

Closed fancyHeat closed 2 weeks ago

fancyHeat commented 3 weeks ago

Alright so, I've been having this issue for about 2 years, across multiple MIAB versions and installs. Box is running on Vultr with

I've got about 150 mailboxes in an account setup for some dev work I do, with alot of active connections.

When trying to log into webcube I get the following error:

Screenshot 2024-08-28 at 8 17 53 PM

If I reboot the box, I'll gain access again, but then the same error pops up in like 15 minutes and stays until I reboot again. Using a mail client still seems to work fine.

Here's the last line from the roundcube error log: [28-Aug-2024 20:18:33 -0500]: <thi95kte> IMAP Error: Login failed for email@fakedomin.com against localhost from mypublicip. Could not connect to ssl://localhost:993: Unknown reason in /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 211 (POST /mail/?_task=mail&_action=refresh)

After so many installs and MIAB versions, I'm starting to think it might be the special Ubuntu images that Vultr gives. Or maybe the number of connection to the box, which isn't even crazy, it's just one per mailbox.

JoshData commented 2 weeks ago

It's probably rate-limiting either in Dovecot or fail2ban.

fancyHeat commented 2 weeks ago

It was indeed dovecot! I saw client connections were being dropped in /var/log/mail.log. I doubled default_client_limit and quadrupled default_process_limit. Also added a vCPU to the system. All looks good now, system load looks great!

I should look into fail2ban as well and make sure nothing it wrong there.

JoshData commented 2 weeks ago

Oh great! I'll close the issue then.