Skip to content

Commit

Permalink
imapd.c: remove support for XMOVE command
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmurchison committed Jun 11, 2024
1 parent 4f5d511 commit 9e14064
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 20 deletions.
14 changes: 14 additions & 0 deletions changes/next/remove_imap_xmove
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

Description:

Support for the legacy IMAP XMOVE command has been removed.


Config changes:

None.


Upgrade instructions:

None.
22 changes: 3 additions & 19 deletions imap/imapd.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,6 @@ static struct capa_struct base_capabilities[] = {
{ "XCONVERSATIONS", CAPA_POSTAUTH|CAPA_CONFIG, /* CY */
{ .config = IMAPOPT_CONVERSATIONS } },
{ "XLIST", CAPA_POSTAUTH, { 0 } }, /* NS */
{ "XMOVE", CAPA_POSTAUTH, { 0 } }, /* NS */
{ "XUSERGROUPS", CAPA_POSTAUTH|CAPA_STATE,
{ .statep = &auth_is_mboxgroups } }, /* CY */

Expand Down Expand Up @@ -897,7 +896,7 @@ static void imapd_log_client_behavior(void)
"%s%s%s%s"
"%s%s%s%s"
"%s%s%s"
"%s%s%s",
"%s%s",

session_id(),
imapd_userid ? imapd_userid : "",
Expand Down Expand Up @@ -928,8 +927,7 @@ static void imapd_log_client_behavior(void)
client_behavior.did_utf8_accept ? " utf8_accept=<1>" : "",

client_behavior.did_scan ? " scan=<1>" : "",
client_behavior.did_xlist ? " xlist=<1>" : "",
client_behavior.did_xmove ? " xmove=<1>" : "");
client_behavior.did_xlist ? " xlist=<1>" : "");
}

static void imapd_reset(void)
Expand Down Expand Up @@ -2097,10 +2095,7 @@ static void cmdloop(void)

cmd_copy(tag.s, arg1.s, arg2.s, usinguid, /*ismove*/1);

if (cmdname[0] == 'x')
client_behavior.did_xmove = 1;
else
client_behavior.did_move = 1;
client_behavior.did_move = 1;

prometheus_increment(CYRUS_IMAP_MOVE_TOTAL);
} else goto badcmd;
Expand Down Expand Up @@ -2539,10 +2534,6 @@ static void cmdloop(void)
if (readonly) goto noreadonly;
goto move;
}
else if (!strcmp(arg1.s, "xmove")) {
if (readonly) goto noreadonly;
goto move;
}
else if (!strcmp(arg1.s, "replace")) {
if (readonly) goto noreadonly;
goto replace;
Expand Down Expand Up @@ -2698,13 +2689,6 @@ static void cmdloop(void)

prometheus_increment(CYRUS_IMAP_LIST_TOTAL);
}
else if (!strcmp(cmd.s, "Xmove")) {
if (readonly) goto noreadonly;
if (!imapd_index && !backend_current) goto nomailbox;
usinguid = 0;
if (c != ' ') goto missingargs;
goto move;
}
else if (!strcmp(cmd.s, "Xrunannotator")) {
if (readonly) goto noreadonly;
if (!imapd_index && !backend_current) goto nomailbox;
Expand Down
1 change: 0 additions & 1 deletion imap/imapd.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ struct client_behavior_registry {
/* non-standard - track for possible deprecation */
uint32_t did_scan : 1; /* used SCAN */
uint32_t did_xlist : 1; /* used XLIST */
uint32_t did_xmove : 1; /* used XMOVE */
};

#endif /* INCLUDED_IMAPD_H */

0 comments on commit 9e14064

Please sign in to comment.