Well, nginx as a mail proxy looks promising, but it doesn't yet work
with public-inbox-imapd. Nginx sends the authentication information as
synchronizing literals [RFC9051, section 4.3].
So the login sequence looks similar to this example lifted from RFC9051
section 7.6:
C: A001 LOGIN {11}
S: + Ready for additional command text
C: FRED FOOBAR {7}
S: + Ready for additional command text
C: fat man
S: A001 OK LOGIN completed
I could potentially look into working up a patch, though my Perl is
rusty and more than 15 years out of practice.
-- Chris