This is not something Roundcube can do out of the box. You could write a plugin to do it but I'd not really a job for the mail client. If you run your clean up scripts on the server then they are going to work whether the user is logged in to Roundcube or not.