mirror of
https://git.code.sf.net/p/archivemail/code
synced 2025-01-03 13:44:46 +00:00
IMAP: servers should never advertise LOGINDISABLED with SSL; removed the check
for it, which was just used to spit a special error message anyway.
This commit is contained in:
parent
26ab4611ec
commit
07219ff14b
1 changed files with 1 additions and 5 deletions
|
@ -1361,7 +1361,6 @@ def _archive_imap(mailbox_name, final_archive_name):
|
||||||
else:
|
else:
|
||||||
vprint("establishing connection to server %s" % imap_server)
|
vprint("establishing connection to server %s" % imap_server)
|
||||||
imap_srv = imaplib.IMAP4(imap_server)
|
imap_srv = imaplib.IMAP4(imap_server)
|
||||||
# What about having an option that makes archivemail never try cram-md5?
|
|
||||||
if "AUTH=CRAM-MD5" in imap_srv.capabilities:
|
if "AUTH=CRAM-MD5" in imap_srv.capabilities:
|
||||||
vprint("authenticating (cram-md5) to server as %s" % imap_username)
|
vprint("authenticating (cram-md5) to server as %s" % imap_username)
|
||||||
result, response = imap_srv.login_cram_md5(imap_username, imap_password)
|
result, response = imap_srv.login_cram_md5(imap_username, imap_password)
|
||||||
|
@ -1369,11 +1368,8 @@ def _archive_imap(mailbox_name, final_archive_name):
|
||||||
vprint("logging in to server as %s" % imap_username)
|
vprint("logging in to server as %s" % imap_username)
|
||||||
result, response = imap_srv.login(imap_username, imap_password)
|
result, response = imap_srv.login(imap_username, imap_password)
|
||||||
else:
|
else:
|
||||||
if not is_ssl:
|
user_error("imap server %s has login disabled (hint: "
|
||||||
user_error("imap server %s has login disabled (hint: "
|
|
||||||
"try ssl/imaps)" % imap_server)
|
"try ssl/imaps)" % imap_server)
|
||||||
else: # Shouldn't happen
|
|
||||||
unexpected_error("imap server %s has login disabled!" % imap_server)
|
|
||||||
|
|
||||||
roflag = options.dry_run or options.copy_old_mail
|
roflag = options.dry_run or options.copy_old_mail
|
||||||
# Work around python bug #1277098 (still pending in python << 2.5)
|
# Work around python bug #1277098 (still pending in python << 2.5)
|
||||||
|
|
Loading…
Reference in a new issue