Can you delete emails with imaplib?  If so how?
Deleting an email over IMAP is performed in two phases:

mark one or more items for deletion: imap.store(msg_no, '+FLAGS', '\\Deleted')
expunge the mailbox: imap.expunge()

(imap is your IMAP4 object)
Using python imaplib to "delete" an email from Gmail?