Short bio: Computer Scientist, FOSS supporter (read more)
Tux Machines (TM)-specific
Maildir saves each mail in a separate file, it is much easier than it used to be to manipulate the mails. Everyone can write some simple script to do some cleanup based on its needs. A while ago I have stumbled across this python script that does most of the things I needed to cleanup maildir folders.
What features was I looking for?
cleanup-maildir has all the features that I needed (and some others). So I would recommend this little script for a quick solution to cleanup maildirs. Here are some useful options: