A little Python utility I wrote years ago to go through a Maildir of bounce messages and add them to a MS SQL Server DB, and thus generate SQL to update the record with the SMTP code, etc.
Not the best way to do things, but for that client it was the best we could do with the tools at hand.