Since changing to Dovecot as the server, IMAP email now works beautifully on the iPhone. At least, once I’d deleted the account and re-typed in all the details (that non-standard IMAP port bug totally screws your account, it just hangs when you change settings even when you change the port back to 993).

I can now check email in seconds, even over GPRS/EDGE. Hooray.

So the moral is, if you want to use IMAP with the iPhone, don’t use uw-imap as the server. At least, not with an Inbox of 3000 messages… (not that that should make much difference, the iPhone simply grabs the most recent 50 by default).