
Converting to a shared mailbox
One of the simplest ways to keep a user's mail after their Office 365 account is no longer being used is to convert the user to a shared mailbox. There are limits as to how many such mailboxes you can create, but this will provide a window in which the data can be transferred to another user's mailbox folders, downloaded as a PST, or backed up in some other fashion. Smaller companies may never hit the limit at all, or may simply decide after a while that preserving the mail is no longer important.
One positive aspect of this approach is that you can take advantage of shared mailboxes even in smaller companies that aren't leveraging enterprise plans in Office 365. Thus, if you have all Business and Business Premium type licenses, you won't need to acquire any E3 license that would be needed to use in-place hold.
Note that this approach does not apply to files stored in OneDrive for Business, so if you need to preserve these, you should look at other methods for doing so. These may include a third-party backup service, conventional backups of the local files, or moving the files to a records center or other SharePoint site.
To convert a mailbox, use the Exchange admin center. Browse to mailboxes under recipients, select a user, and click Convert link under Convert to Shared Mailbox. Follow the instructions to complete the process. Once done, you can safely unassign the user's Exchange Online license without fear that the mailbox could be deleted:

Converting user mailbox to shared mailbox