In 2003, when I wanted to implement a Jabber server at my first employer, management were afraid that the platform would be abused, and wanted a means to archive all conversations. (I’d included transports to MSN, ICQ, and Yahoo Messenger)
The perl code was adapted from other code I’d found, the PHP/MySQL interface was developed from scratch. For a while, Bandersnatch was famous - it was even included in Debian/Ubuntu ports, but was abandoned when perl modules it depended upon became deprecated, and jabberd2 introduced native logging capabilities.
(I also wrote a tutorial re implementing Bandersnatch)
Project link: https://www.funkypenguin.co.nz/project/bandersnatch/