127 |
|
|
128 |
if (opts.force_protocol == PROTOCOL_NONE) { |
if (opts.force_protocol == PROTOCOL_NONE) { |
129 |
if (strcasestr(ibuf.data, "IMAP4rev1")) |
if (strcasestr(ibuf.data, "IMAP4rev1")) |
130 |
conn->prot = PROTOCOL_IMAP4REV1; |
conn->proto = PROTOCOL_IMAP4REV1; |
131 |
else if (strcasestr(ibuf.data, "IMAP4")) |
else if (strcasestr(ibuf.data, "IMAP4")) |
132 |
conn->prot = PROTOCOL_IMAP4; |
conn->proto = PROTOCOL_IMAP4; |
133 |
else { |
else { |
134 |
error("server supports neither the IMAP4rev1 nor the " |
error("server supports neither the IMAP4rev1 nor the " |
135 |
"IMAP4 protocol\n"); |
"IMAP4 protocol\n"); |
136 |
return -2; |
return -2; |
137 |
} |
} |
138 |
} else |
} else |
139 |
conn->prot = opts.force_protocol; |
conn->proto = opts.force_protocol; |
140 |
|
|
141 |
if (strcasestr(ibuf.data, "NAMESPACE")) |
if (strcasestr(ibuf.data, "NAMESPACE")) |
142 |
conn->caps |= CAPABILITY_NAMESPACE; |
conn->caps |= CAPABILITY_NAMESPACE; |