client_disconnect(client, msg);
}
+void client_add_capability(struct client *client, const char *capability)
+{
+ /* require a single capability at a time (feels cleaner) */
+ i_assert(strchr(capability, ' ') == NULL);
+
+ if (client->set->imap_capability[0] != '\0' &&
+ client->set->imap_capability[0] != '+') {
+ /* explicit capability - don't change it */
+ return;
+ }
+ str_append_c(client->capability_string, ' ');
+ str_append(client->capability_string, capability);
+}
+
void client_send_line(struct client *client, const char *data)
{
(void)client_send_line_next(client, data);
void client_disconnect(struct client *client, const char *reason);
void client_disconnect_with_error(struct client *client, const char *msg);
+/* Add the given capability to the CAPABILITY reply. If imap_capability setting
+ has an explicit capability, nothing is changed. */
+void client_add_capability(struct client *client, const char *capability);
+
/* Send a line of data to client. */
void client_send_line(struct client *client, const char *data);
/* Send a line of data to client. Returns 1 if ok, 0 if buffer is getting full,