I had an error saying /usr/local/courier-imap/libexec/authlib/authvchkpw : No such file or directory. authvchkpw was not were it was supposed to be. I copied it from the courier-imap source directory to that location and it worked fine.