--- src/imap/main.c.orig Thu Mar 20 16:32:48 2003 +++ src/imap/main.c Thu Mar 20 17:00:37 2003 @@ -70,6 +70,7 @@ struct client *client; struct mail_storage *storage; const char *user, *mail, *str; + const char *tag; int hin, hout; lib_init_signals(sig_quit); @@ -124,11 +125,16 @@ client = client_create(hin, hout, storage); - if (IS_STANDALONE()) { + tag = getenv("IMAPLOGINTAG"); + if (tag == NULL || *tag == '\0') { client_send_line(client, t_strconcat( "* PREAUTH [CAPABILITY "CAPABILITY_STRING"] " "Logged in as ", user, NULL)); - } + } else { + client_send_line(client, + t_strconcat(tag, " OK Logged in.", NULL)); + } + } static void main_deinit(void)