Posts for: #Imap

adVentures in maIl - wEek 6

This week I am at GUADEC. I have been lucky to see a great number of talks and talk with some great people.

I have not had an unproductive week, however.

Over the past week, I have written the code to connection asyncronously to an IMAP server and do some -basic- IMAP parsing.

From latest git commit:

IMAPFolder

  • tracks overall folder uid list
  • count of messages in the folder
  • has data_in and data_out GIO streams
  • change_state()
    • checks if folder is in the IDLE state and sends DONE command if necessary to perform another command
  • new_search()
    • creates a new search object
    • changes state to ‘searchlist’ with the tag of the

Using a basic state variable on the IMAPFolder object to control behaviour depending on the current state. Eg. ignore EXISTS and EXPUNGED while waiting for the results of an IMAP serach.

[Read more]

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.

[Read more]