We removed a user’s account and then decided we still wanted access to the mailbox. After re-adding the account, SquirrelMail was saying nothing but:
ERROR: Connection dropped by IMAP server.
To fix this, I looked at the UID of the fileowner of the email files. Then I edited /etc/passwd so that the re-added user had the same UID as the files. Then all worked correctly with Squirrelmail, hooray.