For a POP account:
Open the messaging app
- tap Menu
- tap Manage Accounts
- tap the account you want to change the settings for
- tap the Other tab
there is a drop down box labeled "Delete Messages older than"
tap the arrow and a list of choices will appear, Never delete is at the bottom.
Now tap OK.
IMAP accounts are synced with the server and there is no setting to not delete from server when you delete on the phone, but most IMAP accounts have a trash folder and the deleted email should go there first.
K-9 Mail has more settings (including do not delete on server).
