Mercurial > dovecot > core-2.2
changeset 16544:6e8bbc150fa9
imap-login: If CAPABILITY is already in server banner, don't ask for it again.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 24 Jun 2013 23:33:59 +0300 |
parents | 082fe68e38c9 |
children | f68a955f4c5c |
files | src/imap-login/imap-proxy.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap-login/imap-proxy.c Mon Jun 24 23:14:35 2013 +0300 +++ b/src/imap-login/imap-proxy.c Mon Jun 24 23:33:59 2013 +0300 @@ -63,7 +63,8 @@ unsigned int len; const char *mech_name, *error; - str_append(str, "C CAPABILITY\r\n"); + if (client->proxy_backend_capability == NULL) + str_append(str, "C CAPABILITY\r\n"); if (client->common.proxy_mech == NULL) { /* logging in normally - use LOGIN command */ @@ -129,6 +130,9 @@ proxy_write_id(client, str); if (str_array_icase_find(capabilities, "SASL-IR")) client->proxy_sasl_ir = TRUE; + i_free(client->proxy_backend_capability); + client->proxy_backend_capability = + i_strdup(t_strcut(line + 5 + 12, ']')); } ssl_flags = login_proxy_get_ssl_flags(client->common.login_proxy);