2060{
2063
2065 int count = 0;
2066 int rc;
2067
2070 if (!adata || !
mdata)
2072
2077
2078
2081 mdata->new_mail_count = 0;
2082
2085
2086
2088 {
2089 snprintf(buf,
sizeof(buf),
"MYRIGHTS %s",
mdata->munge_name);
2091 }
2092 else
2093 {
2094
2097 }
2098
2099
2103 if (postponed_adata &&
2105 {
2107 }
2108
2110 if (c_imap_check_subscribed)
2112
2114
2115 do
2116 {
2117 char *pc = NULL;
2118
2121 break;
2122
2124 continue;
2126
2127
2128
2130 {
2131
2133 {
2136 if (!pc)
2137 goto fail;
2138 }
2139 }
2141 {
2142
2144
2146
2147 pc += 13;
2149 if (!pc)
2150 goto fail;
2151 }
2153 {
2154
2156 pc += 3;
2159 goto fail;
2160 }
2162 {
2164 pc += 3;
2167 goto fail;
2168 }
2170 {
2172 pc += 3;
2175 goto fail;
2176 }
2178 {
2181 }
2182 else
2183 {
2186 {
2189 }
2190 }
2192
2194 {
2198 goto fail;
2199 }
2200
2202 goto fail;
2203
2204
2207 {
2210 }
2211
2212
2215 {
2217 {
2219 }
2220 else
2221 {
2226 {
2228 }
2231 }
2232 }
2233
2236 {
2238 }
2239
2241
2249
2251 {
2253 goto fail;
2254 }
2255
2258
2259fail:
2265}
const char * mutt_str_atoull(const char *str, unsigned long long *dst)
Convert ASCII string to an unsigned long long.
const char * mutt_str_atoui(const char *str, unsigned int *dst)
Convert ASCII string to an unsigned integer.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
short cs_subset_number(const struct ConfigSubset *sub, const char *name)
Get a number config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
#define MUTT_ACL_CREATE
Create a mailbox.
#define MUTT_ACL_POST
Post (submit messages to the server)
#define MUTT_ACL_LOOKUP
Lookup mailbox (visible to 'list')
#define MUTT_ACL_INSERT
Add/copy into the mailbox (used when editing a message)
#define MUTT_ACL_DELETE
Delete a message.
#define MUTT_ACL_WRITE
Write to a message (for flagging or linking threads)
#define MUTT_ACL_SEEN
Change the 'seen' status of a message.
#define MUTT_ACL_READ
Read the mailbox.
#define mutt_message(...)
#define mutt_debug(LEVEL,...)
struct ImapAccountData * imap_adata_get(struct Mailbox *m)
Get the Account data for this mailbox.
int imap_cmd_step(struct ImapAccountData *adata)
Reads server responses from an IMAP command.
int imap_exec(struct ImapAccountData *adata, const char *cmdstr, ImapCmdFlags flags)
Execute a command and wait for the response from the server.
struct ImapMboxData * imap_mdata_get(struct Mailbox *m)
Get the Mailbox data for this mailbox.
int imap_read_headers(struct Mailbox *m, unsigned int msn_begin, unsigned int msn_end, bool initial_download)
Read headers from the server.
@ IMAP_AUTHENTICATED
Connection is authenticated.
@ IMAP_SELECTED
Mailbox is selected.
#define IMAP_RES_OK
<tag> OK ...
#define IMAP_CAP_ACL
RFC2086: IMAP4 ACL extension.
#define IMAP_RES_NO
<tag> NO ...
bool imap_account_match(const struct ConnAccount *a1, const struct ConnAccount *a2)
Compare two Accounts.
#define IMAP_RES_CONTINUE
* ...
char * imap_next_word(char *s)
Find where the next IMAP word begins.
#define IMAP_CMD_QUEUE
Queue a command, do not execute.
char * imap_get_qualifier(char *buf)
Get the qualifier from a tagged response.
int imap_mailbox_status(struct Mailbox *m, bool queue)
Refresh the number of total and new messages.
static char * get_flags(struct ListHead *hflags, char *s)
Make a simple list out of a FLAGS response.
static void imap_mbox_select(struct Mailbox *m)
Select a Mailbox.
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
@ LL_DEBUG3
Log at debug level 3.
@ LL_DEBUG2
Log at debug level 2.
bool mutt_strn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings (to a maximum), safely.
size_t mutt_istr_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix, ignoring case.
void mx_alloc_memory(struct Mailbox *m, int req_size)
Create storage for the emails.
struct Mailbox * mx_mbox_find2(const char *path)
Find a Mailbox on an Account.
@ MX_OPEN_OK
Open succeeded.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
#define STAILQ_FOREACH(var, head, field)
#define STAILQ_EMPTY(head)
void * adata
Private data (for Mailbox backends)
String manipulation buffer.
char * data
Pointer to data.
struct ConnAccount account
Account details: username, password, etc.
IMAP-specific Account data -.
struct Mailbox * prev_mailbox
Previously selected mailbox.
ImapCapFlags capabilities
Capability flags.
unsigned char state
ImapState, e.g. IMAP_AUTHENTICATED.
struct Mailbox * mailbox
Current selected mailbox.
unsigned char status
ImapFlags, e.g. IMAP_FATAL.
struct Connection * conn
Connection to IMAP server.
IMAP-specific Mailbox data -.
unsigned int uid_next
Next UID for new message.
struct ListHead flags
List of permanent flags.
unsigned int new_mail_count
Set when EXISTS notifies of new mail.
unsigned long long modseq
Modification sequence number.
uint32_t uidvalidity
UID validity.
int vcount
The number of virtual messages.
int msg_new
Number of new messages.
int msg_count
Total number of messages.
AclFlags rights
ACL bits, see AclFlags.
void * mdata
Driver specific data.
struct Buffer pathbuf
Path of the Mailbox.
int msg_deleted
Number of deleted messages.
off_t size
Size of the Mailbox.
int msg_flagged
Number of flagged messages.
bool verbose
Display status messages?
int msg_unread
Number of unread messages.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.