如何列出 Dovecot imap 提示命令?

如何列出 Dovecot imap 提示命令?

当我使用以下方式进行 imap 预授权时:

/usr/libexec/dovecot/imap -u username

我可以看到 imap 提示,但不知道如何列出可用的命令(例如 e logout 或 b select inbox 等等)。

如何列出该命令?

答案1

就这样(来自 imap-commands.c)!

希望它能对你有帮助!

static const struct command imap4rev1_commands[] = {
    { "CAPABILITY",     cmd_capability,  0 },
    { "LOGOUT",     cmd_logout,      COMMAND_FLAG_BREAKS_MAILBOX },
    { "NOOP",       cmd_noop,        COMMAND_FLAG_BREAKS_SEQS },

    { "APPEND",     cmd_append,      COMMAND_FLAG_BREAKS_SEQS },
    { "EXAMINE",        cmd_examine,     COMMAND_FLAG_BREAKS_MAILBOX },
    { "CREATE",     cmd_create,      0 },
    { "DELETE",     cmd_delete,      COMMAND_FLAG_BREAKS_MAILBOX |
                         COMMAND_FLAG_USE_NONEXISTENT },
    { "RENAME",     cmd_rename,      COMMAND_FLAG_USE_NONEXISTENT },
    { "LIST",       cmd_list,        0 },
    { "LSUB",       cmd_lsub,        0 },
    { "SELECT",     cmd_select,      COMMAND_FLAG_BREAKS_MAILBOX },
    { "STATUS",     cmd_status,      0 },
    { "SUBSCRIBE",      cmd_subscribe,   0 },
    { "UNSUBSCRIBE",    cmd_unsubscribe, COMMAND_FLAG_USE_NONEXISTENT },

    { "CHECK",      cmd_check,       COMMAND_FLAG_BREAKS_SEQS },
    { "CLOSE",      cmd_close,       COMMAND_FLAG_BREAKS_MAILBOX },
    { "COPY",       cmd_copy,        COMMAND_FLAG_USES_SEQS |
                         COMMAND_FLAG_BREAKS_SEQS },
    { "EXPUNGE",        cmd_expunge,     COMMAND_FLAG_BREAKS_SEQS },
    { "FETCH",      cmd_fetch,       COMMAND_FLAG_USES_SEQS },
    { "SEARCH",     cmd_search,      COMMAND_FLAG_USES_SEQS },
    { "STORE",      cmd_store,       COMMAND_FLAG_USES_SEQS },
    { "UID",        cmd_uid,         0 },
    { "UID COPY",       cmd_copy,        COMMAND_FLAG_BREAKS_SEQS },
    { "UID FETCH",      cmd_fetch,       COMMAND_FLAG_BREAKS_SEQS },
    { "UID SEARCH",     cmd_search,      COMMAND_FLAG_BREAKS_SEQS },
    { "UID STORE",      cmd_store,       COMMAND_FLAG_BREAKS_SEQS }
};
#define IMAP4REV1_COMMANDS_COUNT N_ELEMENTS(imap4rev1_commands)

static const struct command imap_ext_commands[] = {
    { "CANCELUPDATE",   cmd_cancelupdate,0 },
    { "ENABLE",     cmd_enable,      0 },
    { "ID",         cmd_id,          0 },
    { "IDLE",       cmd_idle,        COMMAND_FLAG_BREAKS_SEQS |
                         COMMAND_FLAG_REQUIRES_SYNC },
    { "NAMESPACE",      cmd_namespace,   0 },
    { "SORT",       cmd_sort,        COMMAND_FLAG_USES_SEQS },
    { "THREAD",     cmd_thread,      COMMAND_FLAG_USES_SEQS },
    { "UID EXPUNGE",    cmd_uid_expunge, COMMAND_FLAG_BREAKS_SEQS },
    { "UID SORT",       cmd_sort,        COMMAND_FLAG_BREAKS_SEQS },
    { "UID THREAD",     cmd_thread,      COMMAND_FLAG_BREAKS_SEQS },
    { "UNSELECT",       cmd_unselect,    COMMAND_FLAG_BREAKS_MAILBOX },
    { "X-CANCEL",       cmd_x_cancel,    0 },
    { "XLIST",      cmd_list,        0 }
};
#define IMAP_EXT_COMMANDS_COUNT N_ELEMENTS(imap_ext_commands)

答案2

相关内容