As has been said many times on this forum, that depends on your IMAP server setup. It is best to do filtering on the server, that way its the same no matter which client you use. Roundcube ships with a plugin called Managesieve which can be used to manage sieve filters on an IMAP server (assuming that is something your setup supports). IIRC there is a plugin for Roundcube which adds client side filtering if you really want. Basically you need to search the available plugins and find the one that's right for you.