Should be done IMAP server side. IMO, it is not a job for RoundCube.
Reason: If this feature is present in RoundCube it would move message as required. But if you access the account by a desktop client (OE, Thunderbird, etc.) you will have to setup an according rule there for this job as well.
Look into managesieve (I'm not too familiar with it) or hMailserver rules (that is what I'm using).