then it only works when the client is running
Actually, in my case that is
exactly what I am asking for. I really don't want some behind-the-scenes task deleting messages when I'm not around.
What I
would love to have is something that is done ONLY when my email client (i.e. Roundcube, in this case) logs out. That way, messages more than X days older than "now" (when I log out) will go away, but next time I log in, all of the others would still be there. That way, if I go on vacation or worse, have an accident that keeps me away from my email, I don't need to worry that something I might need would be automatically removed while I'm gone. Of course, it is MY responsibility to review my old trash the next time I log in or it would go away when I log out, but that is to be expected.
So the argument that it wouldn't happen when Roundcube isn't running is a PLUS in my opinion.
I probably interpret the Roundcube setting you mentioned, "Flag the message for deletion instead of delete," incorrectly. To me it sounds like messages are marked for later deletion instead of immediately being deleted, but that does not appear to have anything to do with the trash folder. Now, if the option said, "Mark messages as Trash instead of moving them immediately into the Trash folder" I would understand that option immediately.
Since FLAG, /Deleted, and EXPUNGE work as I thought they did, it seems that all Roundcube would need to know is the name of your account's Trash folder (that may even be an existing Roundcube setting) in order to use a single function to use the advertised commands to implement the "delete trash older than" feature for ANY confirming IMAP server.
Oh well. Maybe someone who actually works on Roundcube will see this and let us know what they think about it. Until then, I think I'm going to give up.