Why can't I delete messages from my IMAP account on my iPhone 4?
Maybe the trash folder is not correctly set on your iPhone.
Depending on the email-provider, you may have to choose the correct "deleted" folder in your account settings on the iPhone.
(maybe the translations are not literally, i am using a German iPhone): Go to "Settings" -> "Mail, contacts ...", choose your IMAP account, choose "account info", look at the bottom and choose "advanced".
Here you can choose which folder is your trash folder.
I was having a problem deleting an email that said "this message has not been downloaded from server." I couldn't move it to Trash either, even after affirming the prompt to "download message from server." I finally forwarded it to myself and was prompted to download message before sending. I answered yes. I then deleted the forwarded message and the original troublesome message and all is well.