diff --git a/head/offlineimap.conf b/head/offlineimap.conf index 85907ab..6448edd 100644 --- a/head/offlineimap.conf +++ b/head/offlineimap.conf @@ -35,7 +35,7 @@ accounts = Test [Test] # Specify the remote hostname. -remotehost = imap.postoffice.net +remotehost = pi.complete.org # Whether or not to use SSL. ssl = yes @@ -44,7 +44,7 @@ ssl = yes # remoteport = 993 # Specify the remote user name. -remoteuser = jgoerzen//quovix.com +remoteuser = pilot # Specify the remote password. If not specified, you will be # prompted. diff --git a/head/offlineimap.py b/head/offlineimap.py index 0089073..cb693a8 100644 --- a/head/offlineimap.py +++ b/head/offlineimap.py @@ -21,6 +21,7 @@ from imapsync import imaplib, imaputil, imapserver, repository, folder import re, getpass, os, os.path from ConfigParser import ConfigParser +imaplib.Debug = 5 config = ConfigParser() config.read("imapsync.conf") metadatadir = os.path.expanduser(config.get("general", "metadata")) diff --git a/head/offlineimap/folder/Base.py b/head/offlineimap/folder/Base.py index 7f5b194..b59afee 100644 --- a/head/offlineimap/folder/Base.py +++ b/head/offlineimap/folder/Base.py @@ -65,7 +65,11 @@ class BaseFolder: If the backend cannot assign a new uid, it returns the uid passed in. IMAP backend should be the only one that can assign a new uid. If the uid is < 0 and the backend cannot assign a new UID, it is - required to TAKE NO ACTION other than returning the uid passed in.""" + required to TAKE NO ACTION other than returning the uid passed in. + + If the uid is > 0, the backend should set the uid to this, if it can. + It will return the uid assigned in any case. + """ raise NotImplementedException def getmessageflags(self, uid): diff --git a/head/offlineimap/folder/IMAP.py b/head/offlineimap/folder/IMAP.py index 04ba879..30dfbfc 100644 --- a/head/offlineimap/folder/IMAP.py +++ b/head/offlineimap/folder/IMAP.py @@ -53,5 +53,10 @@ class IMAPFolder(BaseFolder): def getmessagelist(self): return self.messagelist + def getmessage(self, uid): + assert(self.imapobj.select(self.getfullname())[0] == 'OK') + return self.imapobj.uid('fetch', '%d' % uid, '(RFC822)')[1][0][1] + + def getmessageflags(self, uid): + return self.getmessagelist()[uid]['flags'] -