OK, so the problem is Dovecot master process isn't passing environment variables to child processes it creates. Does this change anything:
No, still $ telnet localhost 143 Trying 127.0.0.1... Connected to zoidberg. Escape character is '^]'. FBUG: PROCESS_UID environment not given Connection closed by foreign host.