Just set up rules to be applied to incoming emails. First, create different folders for the accounts. Then go to Tools -> Rules and Alerts. Create rules to move emails from a specified account to a specific folder. After you create the rule, incoming mail should now be sorted accordingly.
You can probably do the same for sorting sent messages by selecting Check messages after sending instead of Check messages when they arrive. However, I haven't tried this myself so I don't know if it works.
2B||!2B