Extrect selected entries from LDIF files like grep
ldif-extract is a small 'grep' like tool to extract and convert data from LDIF files. It could be used standalone or also in a pipe together with other tools like ldapsearch.
Mail::MboxParser offers object-oriented access to UNIX-mailboxes. Basically two types of objects exist: Mailboxes and and single messages. It focuses on easy extraction of MIME-parts, parsed headers and bodies. It is intended for read-only access.