Hi Dirk, I'm a vm user for reading my mail. Thanks a lot for this bug report and fix. It also works for me. Patching /etc/emacs/site-start.d/50vm-init.el still compiles vm-vars and vm-version, but I can start the VM mode and read my mails with emacs 28 using bookworm.
After this first test, I can upgrade my computer to bookworm. Yeah! I vote for adding this fix into a new vm version for bookworm proposed updates. -- reagrds Thomas