You can set many different ways to handle your messages, whether they are incoming, outgoing, or from certain individuals. The idea is to set up Filters to handle the messages. The picture below shows the Filter window, located under the Tools Menu.
Some of the actions you can do include transferring, copying, deleting, forwarding, and redirecting of messages.

A very important note to IMAP users. By default, email that you send out will have a copy made into the Out box on your LOCAL drive. (You cannot access it from other locations.) You may wish to create a filter that copies all outgoing mail to your "Sent Mail" box on the server. Here is what it would look like.

At that point, you can go back into your Tools|Options menu and turn off the option for keeping copies.