The act of causing the messages to be deleted from the IMAP server is supposed to be initiated from the IMAP client, via the "EXPUNGE" command - see RFC 3501: http://www.faqs.org/rfcs/rfc3501.html
I am including several quotes from the RFC to highlight the relevant portion - but I believe the plugin is just using LOGOUT, which does not explicitly EXPUNGE messages marked to be deleted. A CLOSE command would EXPUNGE the messages marked for deletion, as would simply calling EXPUNGE directly.
We're using your email plugin and just noticed this behavior and we're looking for a workaround for this. I'm looking at simply writing a perl script to do it externally, which would be an ugly hack, but would at least get the old mail removed regularly.
Any chance you could take a look at adding a method to your plugin that would call EXPUNGE via IMAP? perhaps "EmailExpungeDeleted" or something of the sort?
Thank you for your time,