Better sorting of maildirs in the Mutt browser
I’ve been always dissatisfied with the sort_browser=date option in
Mutt, particularly when dealing with maildirs. For me, the reasonable
behavior is to sort by the newest entry under the new/ directory, so
that reverse sorting places the maildirs with most recent mails first.
There is a patch by Dale Woolridge to address this issue, but since it only looks at the mtime of the new/ directory, once new mail has been read in a maildir, it still stays on the top of the list.
So for me, the solution was to write an external program that would sort the list of maildirs by the date of the most recent new file, and have mutt read that list. Maybe you find it useful as well.