Add a delay in the config file to delete old messages from the message store.
This could be done with a script and a crontab for the FS message store.
I've been noodling back and forth on a script for my own ZNC FS logs and would like to throw in the suggestion of making this configurable per channel/user, or more specifically I'd like to be able to prune old messages older than X time except for a configured list of channels and users.
My own preference would be to have channels be opt-in for pruning and users be opt-out for pruning
Right, one issue with this ticket is that there are so many different use-cases. One use-case is users configuring per-channel rules, another is admins enforcing a max disk usage for their users. One might want to prune by date, by number of messages, by size on disk, and so on.