This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.

Why doesn't Dovecot work?

It says "Authentication failed"

First of all enable auth_debug_passwords=yes and see if the logs show what the problem is. For non-PAM setups it should contain all the information needed to solve the problem. If it's trying to use a wrong password scheme, you can change that. See Authentication/PasswordSchemes.

If the client isn't even attempting to log in, you most likely have disable_plaintext_auth=yes (default) and the client isn't configured to use SSL/TLS (or you've also ssl_disable=yes).

If you're using PAM:

It's not finding my emails

mail_debug=yes makes Dovecot log where it's really looking for mails. Also əuth_debug=yes may be helpful in debugging. See MailLocation for how to configure where the mails are looked up from.

It says Can't load certificate

If the key isn't password protected and you get an error like:

Sep 29 01:33:54 mail dovecot: imap-login: Can't load certificate file /etc/ssl/private/ssl-cert-mail-cacert.pem: error:0906D06C:PEM routines:PEM_read_bio:no start line
Sep 29 01:33:54 mail dovecot: child 27252 (login) returned error 89
Sep 29 01:33:54 mail dovecot: imap-login: Can't load certificate file /etc/ssl/private/ssl-cert-mail-cacert.pem: error:0906D06C:PEM routines:PEM_read_bio:no start line
Sep 29 01:33:54 mail dovecot: child 27253 (login) returned error 89

You may have mixed up the ssl_cert_file and ssl_key_file settings in the config file. (v1.1.4+ mentions this in the error message.)

User's IMAP connection gets unexpectedly closed while retrieving headers of a large folder

And the log looks like:

Sep 12 16:10:34 hostname dovecot: IMAP(username): block_alloc(): Out of memory
Sep 12 16:10:34 hostname dovecot: child 17717 (imap) returned error 83 (Out of memory)

You may need to increase the mail_process_size setting in the config file. (v1.1.4+ mentions this setting in the latter error message.)