nextcloud / nextcloud/mail

Inbox only showing new mails but not whole message list

Open
#10,124 6 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
  1. Login, open mail app
  2. Click on inbox
Expected behavior

Inbox should show all mails

Actual behavior

Inbox is empty or showing only the mails after a particular point in time

Mail app version

3.7.8

Mailserver or service

Cyrus IMAPd

Operating system

Debian

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database

MariaDB

Additional info

Mailbox was showing all mails earlier. I then deleted a mail from inbox using a parallel logged in Thunderbird client. Now mail app shows only mails coming in after this incident. Currently 28 mails are in this inbox, mail app is showing an empty inbox. No errors in log. OCC mail-account-sync is showing no errors:

$ sudo -u www-cloud php8.2 --define apc.enable_cli=1 occ mail:account:sync 5 -f -vvv
[debug] Skipping mailbox sync for 68
[debug] Skipping mailbox sync for 77
[debug] Skipping mailbox sync for 62
[debug] Skipping mailbox sync for 75
[debug] Skipping mailbox sync for 67
[debug] Skipping mailbox sync for 63
[debug] Skipping mailbox sync for 66
[debug] Skipping mailbox sync for 70
[debug] Skipping mailbox sync for 69
[debug] Skipping mailbox sync for 71
[debug] Skipping mailbox sync for 64
[debug] Skipping mailbox sync for 73
[debug] Syncing 61
[debug] Locking mailbox 61 for new messages sync
[debug] Locking mailbox 61 for changed messages sync
[debug] Locking mailbox 61 for vanished messages sync
[debug] Running initial sync for 61
[debug] Initial sync 5:INBOX - mailbox meta search took 1s. 30/30MB memory used
[debug] Range for findAll did not find any (not already known) messages and all messages of mailbox INBOX have been fetched.
[debug] Initial sync 5:INBOX - fetch 3 messages from IMAP took 0s. 30/30MB memory used
[debug] Initial sync 5:INBOX took 1s
[debug] Unlocking mailbox 61 from vanished messages sync
[debug] Unlocking mailbox 61 from changed messages sync
[debug] Unlocking mailbox 61 from new messages sync
[debug] Skipping mailbox sync for 65
[debug] Skipping mailbox sync for 80
[debug] Skipping mailbox sync for 74
[debug] Skipping mailbox sync for 78
[debug] Skipping mailbox sync for 72
[debug] Skipping mailbox sync for 79
[debug] Skipping mailbox sync for 76
[debug] Building threads for account 5
[debug] Account 5 has 1293 messages with threading information
[debug] Threading 1293 messages - build ID table took 0s. 31/31MB memory used
[debug] Threading 1293 messages - build root container took 0s. 31/31MB memory used
[debug] Threading 1293 messages - free ID table took 0s. 31/31MB memory used
[debug] Threading 1293 messages - prune containers took 0s. 31/31MB memory used
[debug] Threading 1293 messages - group by subject took 0s. 31/31MB memory used
[debug] Threading 1293 messages took 0s
[debug] Account 5 has 667 threads
[debug] Account 5 has 0 messages with a new thread IDs
31MB of memory used

SELECT * FROM oc_mail_messages WHERE mailbox_id = 61
returns zero results.

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 reported occ mail:account:sync 5 -f -vvv run and the Cyrus IMAPd mailbox-sync path, focusing on mailbox 61 (INBOX). Compare the sync output with oc_mail_messages rows for mailbox_id 61; done means existing inbox messages are restored and the mail app shows the full list, not only newly arriving mail.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.