I recently wrote something like that but for mailboxes.  It uses
formail etc and requires that each mail has a Message-Id (which
some didn't have...).
Look into the -D and -s options of formail, maybe it works for
maildirs too?

Reply via email to