summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-08-02 10:53:50 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-08-02 10:53:50 (GMT)
commitfad96044eba850d871d34987317bd4e1d34e300f (patch)
tree73f9fbbe4f810bda2fd107ef6e38c1b994c92da8
parenta7bcbfccf3bb3fc7808ea625075e066f0783b1c8 (diff)
downloadpykolab-fad96044eba850d871d34987317bd4e1d34e300f.tar.gz
Configure Auth() correctly, or we will not be able to adjust the mailhost attribute
-rw-r--r--pykolab/cli/cmd_transfer_mailbox.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pykolab/cli/cmd_transfer_mailbox.py b/pykolab/cli/cmd_transfer_mailbox.py
index 4a4069a..cef9ec1 100644
--- a/pykolab/cli/cmd_transfer_mailbox.py
+++ b/pykolab/cli/cmd_transfer_mailbox.py
@@ -55,13 +55,13 @@ def execute(*args, **kw):
domain = mbox_parts['domain']
user_identifier = "%s@%s" % (mbox_parts['path_parts'][1], mbox_parts['domain'])
- source_server = imap.user_mailbox_server(mailfolder)
- imap.connect(server=source_server)
- imap.imap.xfer(mailfolder, target_server)
-
- auth = Auth()
+ auth = Auth(domain=domain)
auth.connect()
user = auth.find_recipient(user_identifier)
+ source_server = imap.user_mailbox_server(mailfolder)
+ imap.connect(server=source_server)
+ imap.imap.xfer(mailfolder, target_server)
+
auth.set_entry_attributes(domain, user, {'mailhost': target_server})