Squashed commit of the following:
commit 5bcbac33d6
Author: Adam Coddington <me@adamcoddington.net>
Date: Tue Jul 7 23:05:15 2015 -0700
Add handling for situations in which the message was deleted in another thread before processing.
commit 6183f68b39
Author: Adam Coddington <me@adamcoddington.net>
Date: Tue Jul 7 22:58:15 2015 -0700
Always store message as attachment if its content-disposition is marked as such.
commit 4c16494b1a
Author: Adam Coddington <me@adamcoddington.net>
Date: Tue Jul 7 22:46:52 2015 -0700
Adding a (hopefully) failing test case for #52.
Apparently the IMAP specification expects that the +FLAGS argument be
surrounded by parentheses; although some e-mail backends (like Gmail)
will accept the +FLAGS argument without surrounding the \Deleted flag
in parentheses, many (reasonably) follow the specification much more
closely. This problem was first noted in report #23.
Searching for other examples of mail deletion, I've found several
Stack Overflow articles in which people are attempting the same task,
and each either uses `imap.store` without surrounding '\Deleted' in
parentheses, or uses `imap.uid` *while* surrounding '\Deleted' in
parentheses:
* http://stackoverflow.com/questions/1777264/using-python-imaplib-to-delete-an-email-from-gmail
* http://stackoverflow.com/questions/3180891/imap-deleting-messages
Testing the switch to uid-based IMAP calls required better testing
The better testing revealed some code that wasn't so pretty
I fixed the tests and the code
Adding a new setting for maximum message size
Adding method to limit a set of message uids by size
Switching to IMAP uids so that we can trust that subsequent
commands will use the same ids