diff options
| author | Nikolaus Schulz <microschulz@web.de> | 2006-10-11 19:56:50 +0000 | 
|---|---|---|
| committer | Nikolaus Schulz <microschulz@web.de> | 2006-10-11 19:56:50 +0000 | 
| commit | 800a957b59b4ef9cecd110bea6b6bdcf224d4add (patch) | |
| tree | f246cedcd4310d7572fdcbfc087bcc6cdbe6bd75 | |
| parent | 27ca6547c581b9c4a31ed6035e819cede31d0684 (diff) | |
| download | archivemail-800a957b59b4ef9cecd110bea6b6bdcf224d4add.tar.gz archivemail-800a957b59b4ef9cecd110bea6b6bdcf224d4add.tar.bz2 archivemail-800a957b59b4ef9cecd110bea6b6bdcf224d4add.zip  | |
Preparing the implementation of IMAP --delete: 
if not dry-running, delete messages whether we archived them or not.
| -rwxr-xr-x | archivemail.py | 16 | 
1 files changed, 8 insertions, 8 deletions
diff --git a/archivemail.py b/archivemail.py index 656b179..988bc72 100755 --- a/archivemail.py +++ b/archivemail.py @@ -1289,14 +1289,14 @@ def _archive_imap(mailbox_name, final_archive_name):          if archive:              archive.close()              archive.finalise() -            # do not delete more than a certain number of messages at a time, because the -            # command length is limited. This avoids that servers terminate the connection with -            # EOF or TCP RST. -            vprint("Deleting %s messages" % len(message_list)) -            max_delete = 100 -            for i in range(0, len(message_list), max_delete): -                imap_srv.store(string.join(message_list[i:i+max_delete], ','), -                    '+FLAGS.SILENT', '\\Deleted') +        # do not delete more than a certain number of messages at a time, because the +        # command length is limited. This avoids that servers terminate the connection with +        # EOF or TCP RST. +        vprint("Deleting %s messages" % len(message_list)) +        max_delete = 100 +        for i in range(0, len(message_list), max_delete): +            imap_srv.store(string.join(message_list[i:i+max_delete], ','), +                '+FLAGS.SILENT', '\\Deleted')      imap_srv.close()      imap_srv.logout()  | 
