Package: archivemail Version: 0.6.2-2 Severity: important Tags: patch IMAP authentication does no longer work in archivemail 0.6.2. Upstream has added the --pwfile option to let archivemail read the IMAP password from a file, but messed up authentication entirely.
The username encoded in the URL is silently ignored, but $USER chosen instead. This doesn't work out. Unless you're using the new --pwfile option, archivemail always prompts for the password, again the password in the URL is ignored. The patch was made against current upstream SVN, but the offsets corrected to match the Debian package in unstable. Nikolaus
Index: archivemail.py =================================================================== --- archivemail.py (revision 102) +++ archivemail.py (working copy) @@ -1239,17 +1239,18 @@ filter = build_imap_filter() vprint("imap filter: '%s'" % filter) try: + imap_username, imap_str = imap_str.split('@', 1) imap_server, imap_folder = imap_str.split('/', 1) - imap_username, imap_str = imap_str.split(':', 1) - imap_password, imap_str = imap_str.split('@', 1) except: - pass - imap_username = getpass.getuser() + unexpected_error("you must provide a properly formatted \ + IMAP connection string") if options.pwfile: imap_password = open(options.pwfile).read().rstrip() else: - imap_password = getpass.getpass() - imap_server, imap_folder = imap_str.split('/', 1) + try: + imap_username, imap_password = imap_username.split(':', 1) + except: + imap_password = getpass.getpass() if mailbox_name[:5] == 'imaps': vprint("Using SSL")