Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Newsroom Update

Apple is introducing a new Apple Watch Pride Edition Braided Solo Loop, matching watch face, and dynamic iOS and iPadOS wallpapers as a way to champion global movements to protect and advance equality for LGBTQ+ communities. Learn more >

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

IMAP support broken in iOS 7?

I am having issues with my IMAP accounts after upgrading to iOS 7. Changes to my Inbox done on other IMAP clients are not properly reflected on the iPhone anymore, e.g. deleted mails or moved mails are still visible on the iPhone. I could not find a way to force a refresh of the Inbox, but the only way to get in sync again with the IMAP server is to delete the account and then add it again.


Anybody else experiencing a similar issue? Is there a workaround for this problem?

iPhone 4S, iOS 7

Posted on Sep 19, 2013 2:40 PM

Reply
145 replies

Feb 25, 2014 8:52 AM in response to Flowingon

That's too bad.


A few questions:


  1. did your admin do it in /var/spool or in your ~/mbox? I think it needs to happen in /var/ spool
  2. what IMAP are you using? We're on UW-IMAP
  3. the OTHER thing we did (which didn't seem to apply) was recompile UW-IMAP so that it defaults to ~/mail instead of the homedir
  4. were you certain that ALL of your clients were closed when the admin cut the file, and then created a NEW iPhone account? Maybe I didn't mention that you have to create a new iPhone account...


It was a catagorical fix for us -- clear and straightforward. But perhaps the ~/mail compile helps as well.


My theory is that when iPhone first comes in, it tries to map all of your homedir, then corrupts its internal database - making it useless for sync. Restating your path SHOULD overwrite the internal database, but it does not - so the state remains corrupt.


Our recompile FORCES the iPhone to only map the mail directory ... so it never collapses ... and then the removal of the dummy file further forces a redefine of the state and a sync (since NOBODY has the state data).


The compile change is in the docs on UW-IMAP ... it's NOT a scary fix (it's a config file). I have the notes on THAT if you want them.


This REALLY works on our system - which is UW-IMAP, BSDOS (UNIX), sendmail

Feb 25, 2014 10:05 AM in response to mgmead

mgmead - thank you so much for your work on this, really appreciated.

I use UW-IMAP with IOS and the fault has been quite a serious problem for the efficient processing of the hundreds of (UW) e-mails received every day. I want to ask if the changes made to the UW-IMAP work flow have corrected mapping for all users, or does it have to be applied for each individual account?

Again, thank you for engaging so actively.

Feb 25, 2014 10:07 AM in response to mgmead

We use UW-IMAP and he did it in both the user and in /var/spool.


After receiving your post, I deleted my mail account, powered off all my devices and we recompiled UW-IMAP as directed. Recreated the account on the iPAD, leaving all other devices powered off. Still the same problem and all other devices are off!


I was so hoping this was the solution.

Feb 25, 2014 10:44 AM in response to mgmead

I made the remedy suggested by mgmead last Sunday and so far all is well and the iDevice mail problem is gone. I'm using uw-imap and the latest IOS. My account receives about 400 msgs per day. I also reviewed my procmail rules and found one that handles about 1/3 of the total email that didn't set the lock file although I've never had any mangled msgs created by competing procmail deliveries. I don't have any IMAP server core dumps.


Becuase its my own server with few users I was able to just turn off SMTP and IMAP before making the change. I did not bother turning off the 4 devices that check mail since IMAP was down. I then edited out the dummy message at the top of the mail file and started everything back up. Prior to change, iPhone and iPad could only cleanly delete or move the first message in the inbox. Afterwards, no problems regardless of message location in inbox. It was not necesary to reconfigure anythinig on my iPhone and iPad.


Thx.

Feb 25, 2014 12:35 PM in response to johnsbramhall

johnsbramhall


The deletion of the dummy message is per-user related.


The re-compile of UW-IMAP affects all users ... what it does is stop the user's IMAP client from seeing ABOVE the newly targeted location.


So, for example - when I hit email even with Thunderbird (not iPhone), the IMAP subscription tool displays the contents of my HOME dir (~mgmead). But with the recompile of UW-IMAP makes it so that Thunderbird only offers the contents of ~/mail ... and doesn't even SEE ~mgmead anymore. That change is universal for all users.


Does that answer your question?

Feb 25, 2014 12:47 PM in response to Flowingon

Flowington


What is your system configuration? What OS?


The ONLY other thing I can think about is that there MIGHT be a second DUMMY message in the spool (Pat said that the DUMMY message does not have to be at the top). Can you search on DUMMY message text?


Also - small thought - did you delete the empty line that was between the DUMMY message and the first message?


The first line of your spool should be:

<<<< this line isn't here

From: different@user.com <<<< this is the first line now

Subject: this is an actual email

.

.

.

Feb 25, 2014 8:50 PM in response to mgmead

Mgmead,


I tried your fix (deleting the default "FOLDER INTERNAL DATA" message) and after a few days it has continued to work for me! I did delete the blank line between that message and the first real message. On our mail server the inbox is in /var/mail/username, and /var/spool contains various mail queues.


So basically if this forces the phone (and other email clients?) to reindex the inbox file, then it seems like something broke between moving/restoring an account from iOS 6 to iOS 7, or upgrading a phone to iOS 7. I didn't reread this whole thread but was it an issue on new iOS 7 devices also, where nothing was restored?


That also raises the question of whether other folders' indexes were corrupted. My guess is few people delete lots of messages out of folders other than their inbox, so maybe no one noticed...?


On my email account on the phone, I had the Advanced setting IMAP Path Prefix set to "mail" which should accomplish the same thing as the discussion of recompiling IMAP. However on our server the inbox is in

/var/mail/username as I said, and other folders are in /home/username/mail.


It will be interesting to see if this is a permanent fix, or if it is just working until the phone re-corrupts its index.

Feb 25, 2014 10:59 PM in response to SteveYates

Hi,


This still is a problem Apple must fix. It started when the iOS was updated from 6 to 7. I use a commercial IMAP-mail service and as an end user I can not do the above tricks on the mail server side. I use my IMAP account with Outlook 2010 on Windows7 laptop, Outlook 2013 on Windows 8.1 desktop, Nokia Lumia 1020 and with iPAD and iPhone. Only the iDevices have problems now.

Feb 26, 2014 6:39 PM in response to mgmead

Now have it working but gave up on UW-IMAP. We installed a new IMAP Dovecot version and all works perfectly. Thank you for your assistance as we would not have tried another IMAP without your pinpoint of the server as the issue. I realize this working for us is not a viable solution for those using a major service provider. Is it possible that our install forced a complete reload of all messages and removed all the prior issues?

Feb 26, 2014 6:56 PM in response to Flowingon

Flowingon wrote:


Is it possible that our install forced a complete reload of all messages and removed all the prior issues?

Changing mail servers would likely trigger reindexing. The corollary to POP accounts is that if one has "leave messages on server" checked, the client will redownload all messages.


Dovecot I think also defaults to maildir format which will also trigger a reindex of all messages.

Feb 26, 2014 11:11 PM in response to Flowingon

Flowingon wrote:


Now have it working but gave up on UW-IMAP. We installed a new IMAP Dovecot version and all works perfectly. Thank you for your assistance as we would not have tried another IMAP without your pinpoint of the server as the issue. I realize this working for us is not a viable solution for those using a major service provider. Is it possible that our install forced a complete reload of all messages and removed all the prior issues?


I talked with Pat and I think SOME people who are still using UW-IMAP may ALSO have a problem if they're allowing the "MBOX" feature to be used. This is a feature that copies the spool into a file in your homedir named MBOX. If you're using that (which I was), it MAY also affect the process. We turned my MBOX off while removing the dummy file -- so I can't tell whether it contributes to the fun or not.


Dovecot likely doesn't use MBOX in the same fashion - so it's feasible that it resolved your problem, Flowingon.


In any event -- SteveYates, are you using MBOX? If so, AND the deleted dummy message fix is working, we can rule MBOX out as a member of the trouble.


Ultimately - this is a problem with Apple -- they've mangled their IMAP libraries so that they don't obey common IMAP rules -- Apple seems not to care at all ... but ever since Steve died ... that's been the brand message anyway. "We no longer care, give us your money, we have no new ideas. Think inertia. -- Apple"


I'm glad this solution is helping people -- the inability to delete was nearly enough for me to stop using an iPhone altogether.


The fact that Apple hasn't chimed in once -- or even muttered that they're looking into it ... amazingly bad. Maybe if we push to 10 pages of commentary, Apple will notice that people are here talking?

IMAP support broken in iOS 7?

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