auto sort mail into folders?

auto sort mail into folders?

By default everything is put into the default inbox. I want to sort incoming emails into folders named after the alias, how can I do this with filters? My preference would be top level folders but subfolders of the inbox would work, too. Also, the same would be nice for sent messages.