Mail has a separate set of settings for .mac. Others are POP3, IMAP, and Exchange.Are you using IMAP?
If you want mail to remain on your Mac, open Apple Mail PREFERENCES.
Select your account and choose the minus (delete) button in the bottom left hand corner.
Then click on the + (new account) and select POP instead of .Mac, IMAP or Exchange. Complete the rest of the details.
Any mail you had on your server should be preserved and will re-appear.
Now anytime you delete a message on the .mac web site, your messages in your Apple Mail programme should remain where they are.