https://git.sr.ht/~sircmpwn/lists.sr.ht/tree/lists-srht-lmtp via https://git.sr.ht/~sircmpwn/lists.sr.ht
Or getting deeper, another project which implements Synapse's[0] RPC protocol and encapsulates high-level RPC actions in asyncio sugar:
https://git.sr.ht/~sircmpwn/broca/tree/broca/connection.py
Code which uses this code:
https://git.sr.ht/~sircmpwn/broca/tree/broca/rpc.py
[0] https://synapse-bt.org