nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
831 stars 257 forks source link

Empty inbox does not load with memory overload #8457

Open mat-m opened 1 year ago

mat-m commented 1 year ago

Steps to reproduce

  1. select your free.fr account inbox mailbox in the navigation list

Expected behavior

The mailbox opens, and it says No messages in this mailbox

Actual behavior

It tries to load for a very long time, then displays "Could not open mailbox"

nextcloud.log has this message:

{
    "reqId": "DqyDrpPwUGygwDeMaSIa",
    "level": 3,
    "time": "2023-05-10T00:22:49+02:00",
    "remoteAddr": "192.168.1.52",
    "user": "mm",
    "app": "PHP",
    "method": "POST",
    "url": "/apps/mail/api/mailboxes/161/sync",
    "message": "Allowed memory size of 2147483648 bytes exhausted (tried to allocate 2147483656 bytes) at /var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Ids.php#366",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 OPR/98.0.0.0 (Edition beta)",
    "version": "26.0.1.1",
    "data": {
        "app": "PHP"
    }
}

If I send and email to this inbox, then it displays fine. It also blocks the unified inbox display (which it shouldn't, IMO)

Mail app version

3.1.1

Mailserver or service

free.fr: imap.free.fr (SSL/993)

Operating system

ubuntu 22.04.2

PHP engine version

None

Web server

None

Database

None

Additional info

Using Nextcloud 26.0.1 official docker image

mat-m commented 1 year ago

Actually, I had an account with the same issue (@free.fr). I needed to send an email so the inbox was not empty. Exact conditions which triggered this behavior are not fully known

mat-m commented 1 year ago

Delete the dummy email, broke again. I edited first message to fit the new issue with free.fr inbox.

Happy to debug more if I can. Let me know.

ChristophWurst commented 1 year ago

Is the mailbox really empty? There could be deleted messages in it. Most clients don't show them.

mat-m commented 1 year ago

When looking through nextcloud mail or their interface (Zimbra on zimbra.free.fr). I have no mail besides the dummy one in the inbox. Some mails in trash, archive, sent and junk. image

pgaufillet commented 7 months ago

Hi, Exactly the same behaviour seen on my side, also with an empty mailbox @ free.fr. Adding an email solves the issue. Looks linked to https://github.com/nextcloud/mail/issues/2855#issuecomment-609833768.