Yes, I know Apple says this will no longer work. But it continues to work just fine on iOS 9 devices. Both iPad and iPhone iOS 9 devices continue to sync via my IMAP account. I enter or modify a note on iPad and I see the change on iPhone immediately, and vice versa. And my web mail client see the Notes folder with the updates. All sub-folders are visible in iPhone and iPad and in the web mail client…but not on Mac OS X.
How can I fix my Mac Notes configuration to reenable syncing via IMAP? I don't need the new features of Notes on El Capitan… I need basic synchronization of simple notes between all devices. I can't use iCloud or any other for-profit web service, I need to sync through a specific IMAP server for compliance reasons.
I've tried restoring the old Notes app, but Apple disallows this during the Time Machine restore function.
Thanks
Best Answer
For anyone else stumbling over this because Notes.app stopped syncing IMAP based notes in El Capitan 10.11.3, the solution which worked for me is the following:
Firstly, check that the IMAP Path Prefix is correct for the account. This can be done in System Preferences / Internet Accounts / (select your account) / Advanced or in Mail.app / Preferences / Accounts / (select your IMAP account) / Advanced. In my case, this was set correctly to
INBOX
, but sometimes requires different values, or no value at all.Secondly, the solution given above by @rene actually works, but it's in French, so here's a step-by-step approach that worked for me.
bash> cd ~/Library/Containers/com.apple.Notes/Data/Library/Notes/
bash> cp NotesV6.storedata NotesV6.storedata.old
NotesV6.storedata
with sqlite3bash> sqlite3 NotesV6.storedata
CTRL-D
sqlite>
sqlite> .schema ZACCOUNT
The
ZACCOUNT
table contains all accounts which Notes.app is accessing. However, in my case, the IMAP based account entry was missing information about username (fieldZUSERNAME
), hostname (fieldZHOSTNAME
) and path prefix (fieldZSERVERPATHPREFIX
). This is the information we need to update.You can dump the whole table by invoking
sqlite> select * from ZACCOUNT
but it's probably easier to select a few relevant fields and identify the
Z_PK
id of your accountsqlite> select Z_PK,ZFULLNAME,ZPARENTACACCOUNTIDENTIFIER,ZUSERNAME, ZHOSTNAME, ZSERVERPATHPREFIX from ZACCOUNT;
This produced the following output for me:
As you can see by the field divider lines (
|
) at the end of the last line, fields for username, hostname, and prefix are empty for the IMAP account (Z_PK
id 5) which is what needs to be corrected.update ZACCOUNT set ZUSERNAME='email@example.com', ZHOSTNAME='imap.hostname.com',ZSERVERPATHPREFIX='INBOX.' where Z_PK=5;
You will of course need to set the correct field values and also adjust the
Z_PK
id with the correct reference, which you identified above.