Is your SMTP mail server Postfix?
Any sever that uses "maildir" is easy this way: simply have a scheduled cron job, run as the postfix or equivalent user, to "mv" the directories or files daily. I mention this method based on your scale of use.
Else you can use "sieve" to do this for you, in it's syntax. Installed along with Postfix is great. Usually per-user configured, with an awesome "manage sieve" Roundcube plugin. You can manually install configs for every user on the file system; also may place in /etc/skel or other new user creation script, so all new users get your choice of rules, depending on your mail storage configs.
With limited details, it appears your request is outside the Roundcube scope, but easily solved with other means.
Good luck.