nextcloud / nextcloud/mail

Adding new mail account or starting mail app with huge number of folders failed

Open
#8,602 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. to triage bug
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Steps to reproduce

Similar situation as #2577 and #2688 #8318
Pretty same as: #8028

  1. There is a remote imap server with shared mailboxes (cyrus-imapd) and a lot of mailboxes (folders).
  2. Existing mail account cannot show any emails or folders, due to timeout.
  3. When I deleted the account and added again, after clicking on to Connect, it started to read from the imap server (horde_imap.log) but after about 14300 commands it just run into time out and I got a message: Error happened during the connection.
Expected behavior

I expect the mailboxes appears, connection established.

Actual behavior
General
  • app will be unresponsible for a while and after that just show an empty folder list, no messages, nothing. I was able to modify the account settings, sieve script was visible. I deleted the account to start over.
  • after I added the account and started to Connect by clicking on Connect, the app started to work, Testing authentication (I checked the horde_imap.log it started to read all folders on the imap server), but after a long time I got message: Error happened and the screen remained on the account settings page and clickable Connect button.
  • I clicked again on Connect, it started again, it is running from the beginning as I can see.
horde_imap.log
S: * MYRIGHTS user/johndoe/Archives/2010 lrswipkxtecda
S: 14310 OK Completed
>> Command 14310 took 0.0329 seconds.
C: 14311 MYRIGHTS user/janedoe/Megosztott
S: * MYRIGHTS user/janedoe/Megosztott lrs
S: 14311 OK Completed
>> Command 14311 took 0.0329 seconds.
>> Slow Command: 5.005 seconds
>> ERROR: read/timeout error.
C: 14312 LOGOUT
S: * BYE LOGOUT received
S: 14312 OK Completed
>> Command 14312 took 0.0328 seconds.
>> Slow Command: 5.005 seconds
>> ERROR: read/timeout error.
>> Slow Command: 5.005 seconds
>> ERROR: read/timeout error.
>> Slow Command: 5.005 seconds
>> ERROR: read/timeout error.
>> Slow Command: 5.004 seconds
>> ERROR: read/timeout error.
>> Slow Command: 5.005 seconds
>> ERROR: read/timeout error.
>> Slow Command: 5.004 seconds
>> ERROR: read/timeout error.
>> Slow Command: 5.005 seconds
>> ERROR: read/timeout error.

This part keep adding continuously:

Slow Command: 5.005 seconds
ERROR: read/timeout error.

Mail app version

3.2.3

Mailserver or service

Cyrus imap 3.6.0

Operating system

Linux Debian

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database

MariaDB

Additional info

When I first added this mail account, it contained less folders than now.
I have to use lot of shared folders with tons of emails.

After I added more shared folders from other users, mail app stopped working for me.

Other accounts on the very same environment (except the numbers of folders) working fine.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the account settings Connect flow and the horde_imap.log output, focusing on the repeated MYRIGHTS commands and read/timeout errors when many shared folders are present. Reproduce with a Cyrus IMAP account containing many folders and verify that the connection completes and the mailboxes and messages appear instead of leaving an empty folder list.

Written by the indexing model from the issue text.

Assessment

Tech stack
mariadb, php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.