Skip to:

Blogs

Adventures in Mail - Week 2

Little progress this week, unfortunately. Some unrelated work got in my way.

The last week was spent discussing how I want to have the the DBus API and the storage backend communicate.

My TODO list was:
* DBus API needs to be totally independent of the cache
* Store raw RFC822 messages in a Maildir-esque local cache

Information requested of the DBus objects will send the request through to the storage backend which will now search for it locally but hit the server if the required information is required. This is rudimentary at the moment.

Adventures in Mail - Week 1

I started coding during the community bonding period.

During this phase I laid out the DBus API for mail, started a basic Command module that will control configuration dataMail will be broken down into objects.

Most of this time was spent figuring out how to handle asyncronous requests of the mail server. Initially, I am using a bunch of threads and a queue for them
to pull work from.

Mail is conceptually separated into Accounts, folders, lists of messages and messages, each with their own API accessable over DBus.

Messages
-get_(body|headers|etc)
Lists

Using Evolution and Thunderbird right now

Thunderbird has my Funambol plugin so I can sync with my Blackberry.
Evolution handles signatures in a way that I agree with.
Thunderbird looks nicer.
Evolution doesn't need to be told to fetch messages from all of my IMAP folders
Thunderbird has superior message threading.
Evolution is a Gnome app.
Thunderbird can mark messages deleted, instead of moving them to some weird Trash folder.
Thunderbird doesn't have the ugliest default addressbook of all time.

I'm really hung up on the signature handling. I don't want all of my messages to go out with my SoC signature.

More thoughts

So, coding has officially started. I have some code written already.

Right now, I'm working on getting a cache controller written. Requests will handed to the Account object, which will then dispatch the actual requests to the Cache controller.

The Cache controller will search locally for the message or hit the server if necessary.

https://desrt.ca/gitweb/?p=marcinmail;a=commit;h=5b8919335c7170fb086abff...

Currently...

I am using Python's IMAPlib. It is acceptable for what I want to do at this point, thankfully. I was not looking forward to writing my own IMAP parser, certainly.

I've got my code connecting to the mail server, getting lists of messages, downloading those messages and providing a simple interface to DBus. D-Feet is a great testing tool, even if it is a little slow.

Next, I will impliment searching the IMAP server for messages over DBus, with a list of UIDs being returned. I'm excited.

Pages

Subscribe to RSS - blogs