/head: changeset 19

*** empty log message ***
This commit is contained in:
jgoerzen 2002-06-20 12:39:27 +01:00
parent 3c199703c2
commit 036b3d10b6
4 changed files with 14 additions and 4 deletions

View File

@ -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.

View File

@ -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"))

View File

@ -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):

View File

@ -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']