I encountered a problem with the RedHat build of pine 4.21 in regards to authenticating to an IMAP server. Whenever I would try to open any folder, including the INBOX, I would get an error that said "You are not authenticated to server. Login first." When I built pine 4.21 por PAM from the tarball in the SRPM, I did not get this error. I did not make any changes to the pine configuration files. We are using the CMU IMAP server here, if that makes any difference.
What is your inbox-path? I have no problems using pine 4.21 w/imap here.
(The problem was with Cyrus IMAPD) Seems to be fixed in pine 4.21-21. Please try, and reopen if still a problem.