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

Debugging Authentication

Numerous settings in dovecot.conf can assist in debugging authentication failures. These are described in the comments in the dovecot-example.conf file that is provided with the source distribution.

In addition it might be useful to know how to construct and to decode a PLAIN mechanism string. printf(1) and mmencode(1) should be available in most Unix or GNU/Linux systems. (If not, check with your distribution. GNU coreutils includes printf(1), and metamail includes mmencode(1).)

Example authentication string encoding

$ printf 'username\0username\0password' | mmencode
dXNlcm5hbWUAdXNlcm5hbWUAcGFzc3dvcmQ=

This string is what a client would use to attempt PLAIN authentication as user "username" with password "password." With verbose logging, specifically with auth_debug_passwords = yes, it would appear in your logs.

Example authentication string decoding

$ echo "FIXME: I don't know how to do this."
FIXME: I don't know how to do this.