IMAP Inbox shows messages that are no longer in IMAP

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
halfgaar
Advanced member
Advanced member
Posts: 90
Joined: Sat Sep 13, 2014 12:54 am
Location: Netherlands
ZCS/ZD Version: Zimbra version doesn't fit in field

IMAP Inbox shows messages that are no longer in IMAP

Postby halfgaar » Fri Jun 25, 2021 8:39 am

I have a system of having an Inbox and Archive folder. When I'm done with a message, I move it to archive. My phone's IMAP client keeps showing a lot of them in Inbox.

I wrote a little Python script to list all the IMAP messages. Snippet of it:

Code: Select all

import sys, os, imaplib, getopt, time
import email

def run():
    M.login(user, password)
    print(M.select(mailbox='INBOX', readonly=True))

    for i in range(1, 30):
        typ, msg_data = M.fetch(str(i), '(RFC822)')
        for response_part in msg_data:
            if isinstance(response_part, tuple):
                msg = email.message_from_string(response_part[1])
                print(msg_data[0][0])
                for header in [ 'subject', 'to', 'from' ]:
                    print('%-8s: %s' % (header.upper(), msg[header]))
                print("")


And it shows this message:

Code: Select all

5 (RFC822 {8169}
SUBJECT : Hexagon xxxxxxxxxxxxxxxxxx
TO      : Wiebe xxxxxxxxxxxxxxxxx
FROM    : Jxxxx Pxxxx


But it's in Archive:

Zimbra_Imap_bug.png
Zimbra_Imap_bug.png (28.15 KiB) Viewed 1766 times


This looks like a bug to me? Can Open Source users still report bugs?

Zimbra version: Release 8.8.15.GA.3869.UBUNTU16.64 UBUNTU16_64 FOSS edition, Patch 8.8.15_P22.


jholder
Zimbra Employee
Zimbra Employee
Posts: 4725
Joined: Fri Sep 12, 2014 10:00 pm

Re: IMAP Inbox shows messages that are no longer in IMAP

Postby jholder » Wed Jul 07, 2021 2:55 am

Are you sure they're not in both?
halfgaar
Advanced member
Advanced member
Posts: 90
Joined: Sat Sep 13, 2014 12:54 am
Location: Netherlands
ZCS/ZD Version: Zimbra version doesn't fit in field

Re: IMAP Inbox shows messages that are no longer in IMAP

Postby halfgaar » Sun Jul 11, 2021 7:30 am

It's not a chain; can one message be in two folders (not tags)? I don't see a way to make that happen.

I'm trying to get all the information I can about the message, but it's just in 'Archive'.

Return to “Developers”

Who is online

Users browsing this forum: No registered users and 5 guests