--- src/master/login-process.c.orig	2005-02-19 22:24:16.000000000 +0100
+++ src/master/login-process.c	2005-02-19 22:56:00.000000000 +0100
@@ -192,13 +192,14 @@
 		i_error("login: Server name wasn't sent");
 	else {
 		name = t_strndup(buf, len);
-		proto = strchr(buf, '/');
+		proto = strchr(name, '/');
 		if (proto == NULL) {
-			i_error("login: Missing protocol from server name '%s'",
-				name);
-			return FALSE;
+			proto = name;
+			name = "default";
 		}
-		name = t_strdup_until(buf, proto++);
+		else {
+			*proto++ = '\0';
+		} 
 
 		if (strcmp(proto, "imap") == 0)
 			protocol = MAIL_PROTOCOL_IMAP;
