Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

IMAP support broken - Never does a STORE for \seen or \deleted flags

IMAP support is broken because it never does a STORE operation for the \seen or \deleted flags. This is the reason messages reappear after been deleted or show up as unread after being read.

No matter how I configure Mail, it never syncs the local state with the IMAP server.

An other nice bug, if a special mailbox does not exists like "Deleted Messages". Mail will not create just complain that it doesn't exists.

Too bad Mail was a really nice MUA.

Anyone else seeing these problems?

cheers,

ck

Mac OS X (10.5)

Posted on Oct 31, 2007 10:29 AM

Reply
39 replies

Oct 31, 2007 12:45 PM in response to Jesse253

Try selecting the mailbox and from the menu Mailbox -> rebuild.

That might get things working, as I can see everything. Just can't mark a message seen or delete it. Also, Mail should update it's local state with changes on the imap server. Apple think of someone using both iphone and Mail to read the same imap store.

ck

Oct 31, 2007 1:42 PM in response to mangler

Thanks for the advise. I tried rebuilding the mailbox, but to no avail. I even watched its actions while it did it (fetching headers etc.). Nothing appeared in Inbox or Sent. I can send emails, but can't receive them. I don't get any errors, it's just nothing shows up. Mail only records new mails sent using mail, and will not record any sent from elsewhere.
This is probably the wrong thread to talk about it, but I didn't get any responses to my original post 🙂

Nov 2, 2007 12:25 PM in response to Peteer

Since I did a clean I don't think this fix will work and after trying it didn't. The real issue still exists and it doesn't matter what mail server you are using, Mail never issues a STORE command for \seen and \deleted flags. It does for $Junk and $NotJunk flags.

Here is a fun test. Delete a message(s) then force a expunge (apple-K, "Erase Deleted Messages"). Quit Mail. Open Mail. The messages will re-appear, no matter how you have the Trash behavior configured.

This bug is hugh problem for drafts and when you read mail from a an other client.

I would be embarrassed if I were one of the Mail developers.

I should test if a POP account has the same problems.

ck

Nov 3, 2007 3:15 AM in response to mangler

Mine seems fine, handles messages exactly as expected, moves, copies, deletes. It does have an irritating bug of creating mailboxes I don't want though, and not deleting them afterwards, Junk for example. I'm using MDaemon 9.61 on Win 2K3 as my mail server.

The only problem I had was it not working at all, ie, not downloading any messages when I first Archived and Restored to Leopard, but I deleted the ~/Library/Mail directory and since then it has been fine. You could try that as a test, just shutdown mail and rename the Mail directory to something else, and startup mail (which will create a new Mail directory), then shutdown again and startup again, see if it still exhibits the same behaviour.

Nov 3, 2007 9:04 PM in response to Chris Ridd

Very interesting. I just did some testing use gmail and it works. So, something is odd. This makes me believe something is reported different and Mail 3.0 is not handling correctly. Say like treating system flags as case sensitive, which it should not. Sure enough,

gmail sends:

* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Draft \Seen \*)]

My imap server sends:

* OK [PERMANENTFLAGS (\answered \flagged \deleted \draft \seen \*)]

I changed my server to return:

* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Draft \Seen \*)]

It all works now. Bad Mail.app developers please read rfc3501 😉

ck

Nov 4, 2007 1:53 AM in response to mangler

Just checked what my server is returning:

Sun 2007-11-04 08:46:15: [734:7] --> * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft)] .

So basically, if I was to change my IMAP server so it returns lower case letters, it won't work? That's insane, quite believable, but insane.

Have you filed a bug with Apple?

http://www.apple.com/feedback/mail.html

Nov 4, 2007 4:19 AM in response to mangler

I don't know if this will help you (or even if it is what made Mail 3 work for me), but I:

1. Quit Mail
2. Removed to the desktop the ~/Library/Mail/Envelope Index file (in the home folder) to the desktop.
3. Launch Mail -- it will ask to reimport all mail before opening.
4. Let it do the import
5. Works now (??)

Note: my only IMAP mail account is an AOL one, which is a little non-standard as far as deleting messages on the server, but it now works fine, or at least just as well as it did in Tiger.

I hope this helps.

IMAP support broken - Never does a STORE for \seen or \deleted flags

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.