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.
Post Reply
halfgaar
Advanced member
Advanced member
Posts: 171
Joined: Sat Sep 13, 2014 12:54 am
Location: Netherlands
ZCS/ZD Version: Ubuntu 18.04, 8.8.15_P43
Contact:

IMAP Inbox shows messages that are no longer in IMAP

Post by halfgaar »

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 11930 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.
User avatar
jholder
Ambassador
Ambassador
Posts: 4824
Joined: Fri Sep 12, 2014 10:00 pm

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

Post by jholder »

Are you sure they're not in both?
halfgaar
Advanced member
Advanced member
Posts: 171
Joined: Sat Sep 13, 2014 12:54 am
Location: Netherlands
ZCS/ZD Version: Ubuntu 18.04, 8.8.15_P43
Contact:

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

Post by halfgaar »

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'.
Post Reply