This is SquirrelMail, as updated for modern Debian with PHP 7.0. It's our "daily driver" here, and because the main project seems to be... sleepy, we keep our own source tree.
There's a Python module to talk to SquirrelMail's backend DB, and some commands built upon it.