The mailprocessing library contains two executables: maildirproc and
imapproc. maildirproc processes one or several several existing mail
boxes in the maildir format. It is primarily focused on mail sorting -
i.e., moving, copying, forwarding and deleting mail according to a set
of rules. It can be seen as an alternative to procmail, but instead of
being a delivery agent (which wants to be part of the delivery chain),
maildirproc only processes already delivered mail. And that's a
feature, not a bug. imapproc does the same thing for IMAP folders.