str_append(greet, "\r\n");
client_send_raw(client, str_c(greet));
+
+ client->banner_sent = TRUE;
}
static void imap_client_starttls(struct client *client)
pool_unref(&client->preproxy_pool);
if (!client->login_success && reason != NULL) {
- reason = t_strconcat(reason, " ",
- client_get_extra_disconnect_reason(client), NULL);
+ const char *extra_reason =
+ client_get_extra_disconnect_reason(client);
+ if (extra_reason[0] != '\0')
+ reason = t_strconcat(reason, " ", extra_reason, NULL);
}
if (reason != NULL)
client_log(client, reason);
(unsigned int)(ioloop_time - client->created));
if (client->auth_attempts == 0) {
+ if (!client->banner_sent) {
+ /* disconnected by a plugin */
+ return "";
+ }
return t_strdup_printf("(no auth attempts in %u secs)",
(unsigned int)(ioloop_time - client->created));
}
if (pop3_client->apop_challenge != NULL)
str_printfa(str, " %s", pop3_client->apop_challenge);
client_send_reply(client, POP3_CMD_REPLY_OK, str_c(str));
+
+ client->banner_sent = TRUE;
}
static void