Many people seem to have issues with deleting messages from the iPhone. Either they can't get the iPhone to delete the message from the server or the iPhone also deletes the mail from their desktop. The problem is that there are many variables: POP, IMAP, settings in mail on iPhone, settings in mail on desktop, etc.
Instead of taking an hour to change this in settings, I took a minute to change my attitude. I now think of Mail on my iPhone as a viewer, not a manager. After all your iPhone really is only set up to view a limited number of messages on your IMAP server.
I don't delete any messages. It's much easier and quicker to delete them from the desktop. I create, reply and forward from my iPhone. I just manage once I get home.