(This is on Fedora 34, Lua 5.4, prosody 0.11.8)
There are two separate errors in mod_auth_dovecot that prevented it from working.
The referenced patch fixes the issues, and I'm now able to authenticate again.
Thanks for the patch!
However, changing `unpack` to `table.unpack` will break it on other Lua versions, at least 5.1 I believe.