Looking at some of my own requirements around IMAP, this is something that I'm intending to implement and contribute as an extension to the existing IMAP channel adapter.
Currently, for processed messages, we can either delete them or mark them as read.
What I'd like to do (and I suspect is a use case for many mail scenarios) is to file successfully processed messages in a specified folder, and a different folder for messages that were attempted to be processed and failed (i.e. threw an SI MessagingException via a DirectChannel). This would work for scenarios where validation or transformation occur before any queues are involved.
A luxury would be to provide a strategy interface for determining the destination folder based on the thrown exception.