A simple python imap sorter.