Blog
Imap Implementation
Date: 29/5/2008
Recent progress with the Imap rewrite:
  • When you click on a folder, email downloads from the server and is cached on the local disk. Clicking on it after loading it once (and restarting) is almost instant, but the flags for each email are updated some time after the folder is displayed. For instance if you select a folder that has since had email deleted using a different client, the deleted email initially appear (they are in the local cache) but after Scribe has finished querying the server the local copies disappear, so as to match the server.
  • I maintain a index of meta data associated with the local files. Included entries for deleted email. Each entry has the server's ID, the current flags (\Seen \Answered etc) and the local file name of the message.
  • When you click on a folder it reads the server's list of email and updates the local meta data and files using messages between the UI and worker threads. This seems to be reaching some sort of stability.
  • I've removed the duplicate "Flags" int from the IMAP mail class and starting using the real IMAP flags structure that the protocol handling class uses. This means that some Scribe flags are not supported at the moment (although I could re-add support using the meta data fields). This is things like the "forwarded" and "bounce" flags.
Basically it looks like the syncing between the local cache and the server is starting to work. Folders have been syncing nicely for a while now. But getting all the email to sync nicely is a lot harder. Work continues.

I also use Thunderbird for IMAP so that I can check Scribe's output against a known good client. This means that I get to experience Thunderbird's crappy IMAP implementation. Wow, and this is supposed to be a great IMAP implementation? Hmmm, I think "Not So Much!". For starters it can lock the GUI up a fair bit when selecting the inbox first thing in the morning, things seem to get stuck a bit. But most annoying is the new mail flag gets set all the time when an incoming email is filtered to a sub-folder and set to "read". Which means that every few minutes Thunderbird sticks it's little "new mail" icon in the system tray, even though it's not mail I care about, just mailing list chatter. *sigh*

So now you don't have to wonder why my vigor to write a good IMAP implementation is so high.
Comments:
Sultan of Stereo
29/05/2008 10:17pm
I'm loving how it sounds.
michael
03/07/2008 12:32pm
Ï can not express how glad I am that you finally do the imap rewrite. I bought inScribe in 2001 and used it exclusively until I got an imap account. The old implementation was unusable so I've been forced to use other clients.

I'm thrilled that I in a not so distant future (?) can use inscribe again.

cheers
 
Reply
From:
Email (optional): (Will be HTML encoded to evade harvesting)
Message:
 
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.
BBcode:
[q]text[/q]
[url=link]description[/url]
[img]url_to_image[/img]
[pre]some_code[/pre]
[b]bold_text[/b]