This is (distantly) related to my previous question, they're both results of my migration from mbox to maildir. I'm doing that so I can rsync my mail folder hierarchy from the system where I actually read my mail to my home system without losing old mails.
So, I want to write a utility that can run as a cron job and, maybe, on demand, that will saerch down my mail hierarchy for empty maildir mailboxes and delete them.
This involves finding any directory that has empty cur, tmp, and new subdirectories and deleting it. I can see all sorts of horribly clumsy ways of doing it but not any really neat way.
Any quick solutions anyone?
Amazingly a Google search turned up nothing useful at all, surely there must be a need for a utility like this.