diff options
| author | Nikolaus Schulz <microschulz@web.de> | 2006-11-01 06:11:55 +0000 | 
|---|---|---|
| committer | Nikolaus Schulz <microschulz@web.de> | 2006-11-01 06:11:55 +0000 | 
| commit | e872f2211e5506b602cefa4b4a9fa0a292dbff93 (patch) | |
| tree | 7ba4e693506e5abe4b571270b8c847dc208e497a /archivemail.py | |
| parent | bea6ef63907ea86af68b907837abf92029a6a9a9 (diff) | |
| download | archivemail-e872f2211e5506b602cefa4b4a9fa0a292dbff93.tar.gz archivemail-e872f2211e5506b602cefa4b4a9fa0a292dbff93.tar.bz2 archivemail-e872f2211e5506b602cefa4b4a9fa0a292dbff93.zip  | |
Changed misleading references to 'message ids' in the IMAP code to the
technically correct 'message sequence number'. 
Diffstat (limited to 'archivemail.py')
| -rwxr-xr-x | archivemail.py | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/archivemail.py b/archivemail.py index f51141d..bbf52dc 100755 --- a/archivemail.py +++ b/archivemail.py @@ -1341,7 +1341,7 @@ def _archive_imap(mailbox_name, final_archive_name):      result, response = imap_srv.search(None, imap_filter)      if result != 'OK': unexpected_error("imap search failed") -    # response is a list with a single item, listing message ids  +    # response is a list with a single item, listing message sequence numbers      # like ['1 2 3 1016']       message_list = response[0].split()      vprint("%d messages are matching filter" % len(message_list)) @@ -1351,7 +1351,8 @@ def _archive_imap(mailbox_name, final_archive_name):          result, response = imap_srv.fetch('1:*', '(RFC822.SIZE)')          if result != 'OK': unexpected_error("Failed to fetch message sizes")          # response is a list with entries like '1016 (RFC822.SIZE 3118)', -        # where the first number is the message id, the second is the size. +        # where the first number is the message sequence number, the second is +        # the size.          for x in response:              msn, blurb, msg_size = x.split()              msg_size = int(msg_size.rstrip(')')) @@ -1361,8 +1362,8 @@ def _archive_imap(mailbox_name, final_archive_name):      if not options.dry_run:          if not options.delete_old_mail: -            for msg_id in message_list: -                result, response = imap_srv.fetch(msg_id, '(RFC822 FLAGS)') +            for msn in message_list: +                result, response = imap_srv.fetch(msn, '(RFC822 FLAGS)')                  if result != 'OK': unexpected_error("Failed to fetch message")                  if "\r\n" == os.linesep:                      msg_str = response[0][1]  | 
