Did you do anything particular config-wise for accessing your local instance of dovecot? I tried with [0] but the connection times out when trying to connect via Thunderbird…
Thunderbird doesn't prompt for this while connecting like a web browser does. It fails to connect without a clear warning in this case.
Full shameful disclosure: Since my backup is only locally accessible on a trusted network I used insecure IMAP on port 143
[1]: https://serverfault.com/questions/532172/thunderbird-not-tru...