summaryrefslogtreecommitdiffstats
path: root/pykolab/imap
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-08 13:39:44 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-08 13:39:44 +0100
commit4090928dcf5aa57933b7b265c661f809eae83671 (patch)
treed5d9c73ffa1ba7f5363282d7cbbe007a93e81dc4 /pykolab/imap
parent720c111b46bc4c558e93d752cf6152a588536d8f (diff)
downloadpykolab-4090928dcf5aa57933b7b265c661f809eae83671.tar.gz
Connect to the new server using the template for the original uri
Diffstat (limited to 'pykolab/imap')
-rw-r--r--pykolab/imap/cyrus.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pykolab/imap/cyrus.py b/pykolab/imap/cyrus.py
index 3df716a..7872c6e 100644
--- a/pykolab/imap/cyrus.py
+++ b/pykolab/imap/cyrus.py
@@ -166,7 +166,7 @@ class Cyrus(cyruslib.CYRUS):
"""
server = self.find_mailfolder_server(mailfolder)
#print "server:", server
- imap.connect('imap://%s:143' % (server))
+ imap.connect(self.uri.replace(self.server,server))
log.debug(_("Setting quota for INBOX folder %s to %s") % (mailfolder,quota), level=8)
try:
@@ -179,7 +179,7 @@ class Cyrus(cyruslib.CYRUS):
Login to the actual backend server, then rename.
"""
server = self.find_mailfolder_server(from_mailfolder)
- imap.connect('imap://%s:143' % (server))
+ imap.connect(self.uri.replace(self.server,server))
log.debug(_("Moving INBOX folder %s to %s") % (from_mailfolder,to_mailfolder), level=8)
imap.rename(from_mailfolder, to_mailfolder, partition)
@@ -192,7 +192,7 @@ class Cyrus(cyruslib.CYRUS):
Login to the actual backend server, then set annotation.
"""
server = self.find_mailfolder_server(mailfolder)
- imap.connect('imap://%s:143' % (server))
+ imap.connect(self.uri.replace(self.server,server))
log.debug(_("Setting annotation %s on folder %s") % (annotation,mailfolder), level=8)
@@ -201,7 +201,7 @@ class Cyrus(cyruslib.CYRUS):
imap.setannotation(mailfolder, annotation, value)
def _xfer(self, mailfolder, current_server, new_server):
- imap.connect('imap://%s:143' % (current_server))
+ imap.connect(self.uri.replace(self.server,server))
log.debug(_("Transferring folder %s from %s to %s") % (mailfolder, current_server, new_server), level=8)
imap.xfer(mailfolder, new_server)