--- dovecot-0.99.13/src/auth/passdb-ldap.c.lfarkas	2004-12-22 17:06:25.000000000 +0100
+++ dovecot-0.99.13/src/auth/passdb-ldap.c	2004-12-22 17:06:56.000000000 +0100
@@ -109,12 +109,11 @@
 	}
 
 	/* Special case for OpenLDAP's MD5 type */
-	if (strcasecmp(scheme, "MD5") == 0) {
+	if (strcasecmp(scheme, "PLAIN-MD5") == 0) {
 		buf = buffer_create_static(data_stack_pool, 16);
 		if (base64_decode(password, strlen(password), NULL, buf) == 1
 				&& buffer_get_used_size(buf) == 16) {
 			password = binary_to_hex(buffer_get_data(buf, NULL), 16);
-			scheme = "PLAIN-MD5";
 		}
 	}
 
