K-9 Mail sync hangs when Dovecot reports "corrupted record in index cache file"

When encountering {X} K-9 Mail will keep reading from the connection until it has received X bytes. If the server sends less data than that, the read operation times out after 60 seconds. However, if the server sends at least one byte every 59 seconds, the app could spend a very long time just waiting for all of the data to arrive. That could explain the behavior you’re seeing. But it seems rather unlikely that the server is sending data periodically with an interval smaller than 60 seconds. The default interval for Dovecot’s periodic “OK Still here” messages is 2 minutes.