changeset 620:d34ee528aa68 HEAD

Send PREAUTH if we were started without LOGIN_TAG environment (ie. not through master process).
author Timo Sirainen <tss@iki.fi>
date Tue, 19 Nov 2002 15:09:25 +0200
parents fcdff89c3df2
children 5690ce7151c9
files src/imap/main.c
diffstat 1 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap/main.c	Sun Nov 17 16:52:43 2002 +0200
+++ b/src/imap/main.c	Tue Nov 19 15:09:25 2002 +0200
@@ -75,15 +75,18 @@
 			i_fatal("MAIL environment missing and "
 				"autodetection failed (home %s)", home);
 		}
-	} else {
-		client = client_create(hin, hout, storage);
+	}
+
+	client = client_create(hin, hout, storage);
 
-		tag = getenv("LOGIN_TAG");
-		if (tag == NULL || *tag == '\0')
-			tag = "*";
-
-		client_send_line(client, t_strconcat(tag, " OK Logged in.",
-						     NULL));
+	tag = getenv("LOGIN_TAG");
+	if (tag == NULL || *tag == '\0') {
+		client_send_line(client, t_strconcat(
+			" * PREAUTH [CAPABILITY "CAPABILITY_STRING"] "
+			"Logged in as ", getenv("USER"), NULL));
+	} else {
+		client_send_line(client,
+				 t_strconcat(tag, " OK Logged in.", NULL));
 	}
 }