If your web hosting space is getting filled to the gills with IMAP messages and you want to do a bit of a purge, you’ll do all the necessary deletions and trash emptying in Apple’s Mail app, but to no avail – the messages remain on the server.

The trick is that you need to quit Mail in order to force it to _truly_ delete the messages and hence allow the server to do so.