Enable Leave a Copy on the Server
- On the Tools menu, click E-mail Accounts.
- Select “View or change existing e-mail accounts”.
- Click “Next” button.
- Select an account and click “Change” button.
- Click “More Settings…” button.
- Click the Advanced tab, and select options Leave a copy of messages on server, Remove from server after 30 day(s)
(You can set the days less or greater than “30″), and Remove from server when deleted from ‘Deleted Items’.
Caution: After you purge or remove message from server, you cannot retrieve it. - Click OK.
Disable Leave a Copy on the Server
Follow through the steps provisioned above, however at Step 6,
Uncheck “Leave a copy of messages on the server” (i.e. there should not be a tick)

Thanks a loot