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

Unable to clear flags in Mail using Exchange 2010

I am able to flag messages without a problem, but when I try to turn those flags off within a few moments it will sync them back to "flagged." I basically cannot unflag a flagged message. Connected to an Exchange 2010 server. Not having any problems getting or syncing mail. Activity window is clear and nothing is queued up.


I see "changing flags" pop up really quick in the Activity window but as soon as it sync's back up with Exchange those flags come right back.


Help!

Mail-OTHER, Mac OS X (10.7)

Posted on Aug 20, 2011 2:31 PM

Reply
40 replies

Aug 24, 2011 2:03 PM in response to jvanoort

I've got a bug report open with Apple and hope to have a workaround soon. Are you able to turn the flag on and off for a few email but most wont work? Let me know if you are able to identify a pattern. Please also describe the steps to reproduce the error. I'm curious if they are the same steps as I am following.

Aug 24, 2011 2:11 PM in response to bradhs

Ya I've been playing/fighting the issue for a while now. I have a smart folder for unread & flagged emails. If I flag a email it will show up in the folder. If I unflag the email it will disapear but after a minute it will reapear as flagged. Seems to only happen to my exchange 2011 emails. Does not happen to any of my gmail(IMAP) or hotmail(POP) emails.


Correction: Thats Exchange 2010 on a SBS 2011 server not exchange 2011.

Aug 24, 2011 2:23 PM in response to jvanoort

Microsoft hasn't released an Exchange 2011 product. SBS 2011 includes Exchange 2010. Confusing, I know.


We are runnnig Exchange 2010 on Server 2008 R2, everything pretty much patched. Exchange is v14.01.0218.015 (aka v14.1 Build 218.15)


I've tried flagging/unflagging while in a regular folder vs a Smart folder with no differences. I basically have what you have setup. Mail is basically syncing up to Exchange and somehow that flag gets re-applied almost like Mail is using a cache or not properly setting the Flag to clear it in the meta data.


I've also idenfied a situation when all emails in a conversation are unflagged the conversation view header of the emails will still show flagged until you refresh the view by switching to a different view then going back.

Sep 13, 2011 9:28 PM in response to bradhs

I've found a solution that works for me, although it's a little technical.


I found that the Envelope Index file in Home/Library/Mail/V2/MailData/ is actually a sqlite3 database.


the steps I followed were:


  1. Quit Mail (don't know if this is necessary)
  2. Open Terminal, and cd to ~/Library/Mail/V2/MailData/
  3. open the sqlite db using the sqlite3 command line client:
    $> sqlite3 Envelope\ Index
  4. Now, in the sqlite3 command shell I queried the messages table to see which messages were flagged:
    sqlite> select * from messages where flagged = '1';
  5. I verified that the one message I couldn't clear was in the result set and then I updated the database and cleared the flag:
    sqlite> update messages set flagged = '0' where flagged = '1';
  6. Re-start Mail, and voila - flagged messages gone.


Note: to selectively clear the flags from only certain messages would probably require a more advanced update statement that included some join in the where clause.

Sep 14, 2011 7:43 AM in response to jfchiriboga

Yes, there is another column in that field called 'flags', which I presume corresponds to more specific information about what kind of flags are set. The value is an integer, possibly a bitmask, with hundreds of different permutations in my email folders, and I only had one flagged email. I presume that column is being used for more than just 'flagged', and given some time and trial and error someone may be able to figure out how to selectively clear just green flags.

Sep 28, 2011 10:51 AM in response to bradhs

Also encounter same issue (under Leopard, now with Lion). I can resolve by exporting mails and reimporting afterwards (as explained in other related post... sorry I cannot find the link anymore). Deleting Envelope index does not resolve the issue in my case. Colouring flags was useful to me for going through the process of re-selecting flags that should disappear from those flags I should keep.

Now, I realize the problem always happen with mails that were flagged using my android smartphone... not via Mail or directly on exchange server (via outlook web acesss)

Do not know if this helps much though...

Oct 27, 2011 9:43 AM in response to bradhs

Not sure how I did this, but I got this problem not to happen (at least for now):


My school tells me to set up my .outlook.com email as IMAP, NOT Exchange, but I used the same prefs for Exchange and it works with mail, contacts, and calendars, as expected. Started noticing this problem and that it didn't occur for Gmail and iCloud accounts, so I deleted and re-added the account. No luck.


Then, I left the Exchange, but also added an IMAP version of the same account with support only for mail. To my surprise, the emails that were (not supposed to be) flagged had a flag in BOTH mailboxes, but under Flagged (canned search) only those from the Exchange version of the account showed up, not from BOTH accounts. So I disabled the IMAP account, and piddled about a little more, and now, to my surprise, flags are cleared.


I did quit Mail once after clearing the flags, so I'm not sure if that's what's making it work now, and it will go back to screwing up after I reply, but for now, that's what has solved my problem.

Nov 8, 2011 6:40 AM in response to bradhs

I've fixed this problem with these simple steps:

1. create a new local mailbox ("on my mac" location) for all folders that contains flagged msgs.


2. move all messages from INBOX (or any other folder that conains flagged msgs) to the newly created mailbox folders.


3. when mail app finish msgs moving, check if your inbox/folders on exchange server are realy empty (of not erase them)


4. move msgs from local ("on my mac" location) mailboxes back to its original mailbox/folders on exchange server.


5. verify and enjoy.

Unable to clear flags in Mail using Exchange 2010

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