NeoMutt  2024-04-16-36-g75b6fb
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
message.c
Go to the documentation of this file.
1
29#include "config.h"
30#include <dirent.h>
31#include <errno.h>
32#include <fcntl.h>
33#include <inttypes.h>
34#include <limits.h>
35#include <stdio.h>
36#include <string.h>
37#include <sys/stat.h>
38#include <unistd.h>
39#include <utime.h>
40#include "mutt/lib.h"
41#include "config/lib.h"
42#include "email/lib.h"
43#include "core/lib.h"
44#include "message.h"
45#include "copy.h"
46#include "edata.h"
47#include "globals.h"
48#include "hcache.h"
49#include "mx.h"
50#include "shared.h"
51#include "sort.h"
52
53struct HeaderCache;
54
55int nm_update_filename(struct Mailbox *m, const char *old_file,
56 const char *new_file, struct Email *e);
57
61static int maildir_sort_flags(const void *a, const void *b, void *sdata)
62{
63 return mutt_numeric_cmp(*((const char *) a), *((const char *) b));
64}
65
72void maildir_gen_flags(char *dest, size_t destlen, struct Email *e)
73{
74 *dest = '\0';
75
76 const char *flags = NULL;
77
79 if (edata)
80 flags = edata->custom_flags;
81
82 /* The maildir specification requires that all files in the cur
83 * subdirectory have the :unique string appended, regardless of whether
84 * or not there are any flags. If .old is set, we know that this message
85 * will end up in the cur directory, so we include it in the following
86 * test even though there is no associated flag. */
87
88 if (e->flagged || e->replied || e->read || e->deleted || e->old || flags)
89 {
90 char tmp[1024] = { 0 };
91 snprintf(tmp, sizeof(tmp), "%s%s%s%s%s", e->flagged ? "F" : "", e->replied ? "R" : "",
92 e->read ? "S" : "", e->deleted ? "T" : "", NONULL(flags));
93 if (flags)
94 mutt_qsort_r(tmp, strlen(tmp), 1, maildir_sort_flags, NULL);
95
96 const char c_maildir_field_delimiter = *cc_maildir_field_delimiter();
97 snprintf(dest, destlen, "%c2,%s", c_maildir_field_delimiter, tmp);
98 }
99}
100
113static FILE *maildir_open_find_message_dir(const char *folder, const char *unique,
114 const char *subfolder, char **newname)
115{
116 struct Buffer *dirname = buf_pool_get();
117 struct Buffer *tunique = buf_pool_get();
118 struct Buffer *fname = buf_pool_get();
119
120 struct dirent *de = NULL;
121
122 FILE *fp = NULL;
123 int oe = ENOENT;
124
125 buf_printf(dirname, "%s/%s", folder, subfolder);
126
128 if (!dir)
129 {
130 errno = ENOENT;
131 goto cleanup;
132 }
133
134 while ((de = readdir(dir)))
135 {
136 maildir_canon_filename(tunique, de->d_name);
137
138 if (mutt_str_equal(buf_string(tunique), unique))
139 {
140 buf_printf(fname, "%s/%s/%s", folder, subfolder, de->d_name);
141 fp = mutt_file_fopen(buf_string(fname), "r");
142 oe = errno;
143 break;
144 }
145 }
146
147 closedir(dir);
148
149 if (newname && fp)
150 *newname = buf_strdup(fname);
151
152 errno = oe;
153
154cleanup:
155 buf_pool_release(&dirname);
156 buf_pool_release(&tunique);
157 buf_pool_release(&fname);
158
159 return fp;
160}
161
169FILE *maildir_open_find_message(const char *folder, const char *msg, char **newname)
170{
171 static unsigned int new_hits = 0, cur_hits = 0; /* simple dynamic optimization */
172
173 struct Buffer *unique = buf_pool_get();
174 maildir_canon_filename(unique, msg);
175
176 FILE *fp = maildir_open_find_message_dir(folder, buf_string(unique),
177 (new_hits > cur_hits) ? "new" : "cur", newname);
178 if (fp || (errno != ENOENT))
179 {
180 if ((new_hits < UINT_MAX) && (cur_hits < UINT_MAX))
181 {
182 new_hits += ((new_hits > cur_hits) ? 1 : 0);
183 cur_hits += ((new_hits > cur_hits) ? 0 : 1);
184 }
185
186 goto cleanup;
187 }
188 fp = maildir_open_find_message_dir(folder, buf_string(unique),
189 (new_hits > cur_hits) ? "cur" : "new", newname);
190 if (fp || (errno != ENOENT))
191 {
192 if ((new_hits < UINT_MAX) && (cur_hits < UINT_MAX))
193 {
194 new_hits += ((new_hits > cur_hits) ? 0 : 1);
195 cur_hits += ((new_hits > cur_hits) ? 1 : 0);
196 }
197
198 goto cleanup;
199 }
200
201 fp = NULL;
202
203cleanup:
204 buf_pool_release(&unique);
205
206 return fp;
207}
208
216static int maildir_sync_message(struct Mailbox *m, struct Email *e)
217{
218 if (!m || !e)
219 return -1;
220
221 struct Buffer *newpath = NULL;
222 struct Buffer *partpath = NULL;
223 struct Buffer *fullpath = NULL;
224 struct Buffer *oldpath = NULL;
225 char suffix[16] = { 0 };
226 int rc = 0;
227
228 if (e->attach_del || e->env->changed)
229 {
230 /* when doing attachment deletion/rethreading, fall back to the maildir case. */
231 if (maildir_rewrite_message(m, e) != 0)
232 return -1;
233 e->env->changed = false;
234 }
235 else
236 {
237 /* we just have to rename the file. */
238
239 char *p = strrchr(e->path, '/');
240 if (!p)
241 {
242 mutt_debug(LL_DEBUG1, "%s: unable to find subdir!\n", e->path);
243 return -1;
244 }
245 p++;
246 newpath = buf_pool_get();
247 partpath = buf_pool_get();
248 fullpath = buf_pool_get();
249 oldpath = buf_pool_get();
250
251 buf_strcpy(newpath, p);
252
253 /* kill the previous flags */
254 const char c_maildir_field_delimiter = *cc_maildir_field_delimiter();
255 p = strchr(newpath->data, c_maildir_field_delimiter);
256 if (p)
257 {
258 *p = '\0';
259 newpath->dptr = p; /* fix buffer up, just to be safe */
260 }
261
262 maildir_gen_flags(suffix, sizeof(suffix), e);
263
264 buf_printf(partpath, "%s/%s%s", (e->read || e->old) ? "cur" : "new",
265 buf_string(newpath), suffix);
266 buf_printf(fullpath, "%s/%s", mailbox_path(m), buf_string(partpath));
267 buf_printf(oldpath, "%s/%s", mailbox_path(m), e->path);
268
269 if (mutt_str_equal(buf_string(fullpath), buf_string(oldpath)))
270 {
271 /* message hasn't really changed */
272 goto cleanup;
273 }
274
275 /* record that the message is possibly marked as trashed on disk */
276 e->trash = e->deleted;
277
278 struct stat st = { 0 };
279 if (stat(buf_string(oldpath), &st) == -1)
280 {
281 mutt_debug(LL_DEBUG1, "File already removed (just continuing)");
282 goto cleanup;
283 }
284
285 if (rename(buf_string(oldpath), buf_string(fullpath)) != 0)
286 {
287 mutt_perror("rename");
288 rc = -1;
289 goto cleanup;
290 }
291 mutt_str_replace(&e->path, buf_string(partpath));
292 }
293
294cleanup:
295 buf_pool_release(&newpath);
296 buf_pool_release(&partpath);
297 buf_pool_release(&fullpath);
298 buf_pool_release(&oldpath);
299
300 return rc;
301}
302
311bool maildir_sync_mailbox_message(struct Mailbox *m, struct Email *e, struct HeaderCache *hc)
312{
313 if (!e)
314 return false;
315
316 const bool c_maildir_trash = cs_subset_bool(NeoMutt->sub, "maildir_trash");
317 if (e->deleted && !c_maildir_trash)
318 {
319 char path[PATH_MAX] = { 0 };
320 snprintf(path, sizeof(path), "%s/%s", mailbox_path(m), e->path);
322 unlink(path);
323 }
324 else if (e->changed || e->attach_del ||
325 ((c_maildir_trash || e->trash) && (e->deleted != e->trash)))
326 {
327 if (maildir_sync_message(m, e) == -1)
328 return false;
329 }
330
331 if (e->changed)
333
334 return true;
335}
336
360static int maildir_commit_message(struct Mailbox *m, struct Message *msg, struct Email *e)
361{
362 char subdir[4] = { 0 };
363 char suffix[16] = { 0 };
364 int rc = 0;
365
366 if (mutt_file_fsync_close(&msg->fp))
367 {
368 mutt_perror(_("Could not flush message to disk"));
369 return -1;
370 }
371
372 /* extract the subdir */
373 char *s = strrchr(msg->path, '/') + 1;
374 mutt_str_copy(subdir, s, 4);
375
376 /* extract the flags */
377 const char c_maildir_field_delimiter = *cc_maildir_field_delimiter();
378 s = strchr(s, c_maildir_field_delimiter);
379 if (s)
380 mutt_str_copy(suffix, s, sizeof(suffix));
381 else
382 suffix[0] = '\0';
383
384 /* construct a new file name. */
385 struct Buffer *path = buf_pool_get();
386 struct Buffer *full = buf_pool_get();
387 while (true)
388 {
389 buf_printf(path, "%s/%lld.R%" PRIu64 ".%s%s", subdir, (long long) mutt_date_now(),
390 mutt_rand64(), NONULL(ShortHostname), suffix);
391 buf_printf(full, "%s/%s", mailbox_path(m), buf_string(path));
392
393 mutt_debug(LL_DEBUG2, "renaming %s to %s\n", msg->path, buf_string(full));
394
395 if (mutt_file_safe_rename(msg->path, buf_string(full)) == 0)
396 {
397 /* Adjust the mtime on the file to match the time at which this
398 * message was received. Currently this is only set when copying
399 * messages between mailboxes, so we test to ensure that it is
400 * actually set. */
401 if (msg->received != 0)
402 {
403 struct utimbuf ut = { 0 };
404 int rc_utime;
405
406 ut.actime = msg->received;
407 ut.modtime = msg->received;
408 do
409 {
410 rc_utime = utime(buf_string(full), &ut);
411 } while ((rc_utime == -1) && (errno == EINTR));
412 if (rc_utime == -1)
413 {
414 mutt_perror(_("maildir_commit_message(): unable to set time on file"));
415 rc = -1;
416 goto cleanup;
417 }
418 }
419
420#ifdef USE_NOTMUCH
421 if (m->type == MUTT_NOTMUCH)
422 nm_update_filename(m, e->path, buf_string(full), e);
423#endif
424 if (e)
425 mutt_str_replace(&e->path, buf_string(path));
427 FREE(&msg->path);
428
429 goto cleanup;
430 }
431 else if (errno != EEXIST)
432 {
433 mutt_perror("%s", mailbox_path(m));
434 rc = -1;
435 goto cleanup;
436 }
437 }
438
439cleanup:
440 buf_pool_release(&path);
441 buf_pool_release(&full);
442
443 return rc;
444}
445
453int maildir_rewrite_message(struct Mailbox *m, struct Email *e)
454{
455 if (!m || !e)
456 return -1;
457
458 bool restore = true;
459
460 long old_body_offset = e->body->offset;
461 long old_body_length = e->body->length;
462 long old_hdr_lines = e->lines;
463
464 struct Message *src = mx_msg_open(m, e);
465 struct Message *dest = mx_msg_open_new(m, e, MUTT_MSG_NO_FLAGS);
466 if (!src || !dest)
467 return -1;
468
469 int rc = mutt_copy_message(dest->fp, e, src, MUTT_CM_UPDATE, CH_UPDATE | CH_UPDATE_LEN, 0);
470 if (rc == 0)
471 {
472 char oldpath[PATH_MAX] = { 0 };
473 char partpath[PATH_MAX] = { 0 };
474 snprintf(oldpath, sizeof(oldpath), "%s/%s", mailbox_path(m), e->path);
475 mutt_str_copy(partpath, e->path, sizeof(partpath));
476
477 rc = maildir_commit_message(m, dest, e);
478
479 if (rc == 0)
480 {
481 unlink(oldpath);
482 restore = false;
483 }
484 }
485 mx_msg_close(m, &src);
486 mx_msg_close(m, &dest);
487
488 if ((rc == -1) && restore)
489 {
490 e->body->offset = old_body_offset;
491 e->body->length = old_body_length;
492 e->lines = old_hdr_lines;
493 }
494
496 return rc;
497}
498
499// Mailbox API -----------------------------------------------------------------
500
504bool maildir_msg_open(struct Mailbox *m, struct Message *msg, struct Email *e)
505{
506 char path[PATH_MAX] = { 0 };
507
508 snprintf(path, sizeof(path), "%s/%s", mailbox_path(m), e->path);
509
510 msg->fp = mutt_file_fopen(path, "r");
511 if (!msg->fp && (errno == ENOENT))
512 msg->fp = maildir_open_find_message(mailbox_path(m), e->path, NULL);
513
514 if (!msg->fp)
515 {
516 mutt_perror("%s", path);
517 return false;
518 }
519
520 return true;
521}
522
531bool maildir_msg_open_new(struct Mailbox *m, struct Message *msg, const struct Email *e)
532{
533 int fd;
534 char path[PATH_MAX] = { 0 };
535 char suffix[16] = { 0 };
536 char subdir[16] = { 0 };
537
538 if (e)
539 {
540 struct Email tmp = *e;
541 tmp.deleted = false;
542 tmp.edata = NULL;
543 maildir_gen_flags(suffix, sizeof(suffix), &tmp);
544 }
545 else
546 {
547 *suffix = '\0';
548 }
549
550 if (e && (e->read || e->old))
551 mutt_str_copy(subdir, "cur", sizeof(subdir));
552 else
553 mutt_str_copy(subdir, "new", sizeof(subdir));
554
555 mode_t omask = umask(maildir_umask(m));
556 while (true)
557 {
558 snprintf(path, sizeof(path), "%s/tmp/%s.%lld.R%" PRIu64 ".%s%s",
559 mailbox_path(m), subdir, (long long) mutt_date_now(),
560 mutt_rand64(), NONULL(ShortHostname), suffix);
561
562 mutt_debug(LL_DEBUG2, "Trying %s\n", path);
563
564 fd = open(path, O_WRONLY | O_EXCL | O_CREAT, 0666);
565 if (fd == -1)
566 {
567 if (errno != EEXIST)
568 {
569 umask(omask);
570 mutt_perror("%s", path);
571 return false;
572 }
573 }
574 else
575 {
576 mutt_debug(LL_DEBUG2, "Success\n");
577 msg->path = mutt_str_dup(path);
578 break;
579 }
580 }
581 umask(omask);
582
583 msg->fp = fdopen(fd, "w");
584 if (!msg->fp)
585 {
586 FREE(&msg->path);
587 close(fd);
588 unlink(path);
589 return false;
590 }
591
592 return true;
593}
594
598int maildir_msg_commit(struct Mailbox *m, struct Message *msg)
599{
600 return maildir_commit_message(m, msg, NULL);
601}
602
608int maildir_msg_close(struct Mailbox *m, struct Message *msg)
609{
610 return mutt_file_fclose(&msg->fp);
611}
612
616int maildir_msg_save_hcache(struct Mailbox *m, struct Email *e)
617{
618 int rc = 0;
619
620 struct HeaderCache *hc = maildir_hcache_open(m);
621 rc = maildir_hcache_store(hc, e);
623
624 return rc;
625}
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition: buffer.c:160
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
Definition: buffer.c:394
char * buf_strdup(const struct Buffer *buf)
Copy a Buffer's string.
Definition: buffer.c:570
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:96
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:48
Convenience wrapper for the config headers.
const char * cc_maildir_field_delimiter(void)
Get the cached value of $maildir_field_delimiter.
Definition: config_cache.c:131
int mutt_copy_message(FILE *fp_out, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen)
Copy a message from a Mailbox.
Definition: copy.c:907
Duplicate the structure of an entire email.
#define MUTT_CM_UPDATE
Update structs on sync.
Definition: copy.h:42
#define CH_UPDATE
Update the status and x-status fields?
Definition: copy.h:54
#define CH_UPDATE_LEN
Update Lines: and Content-Length:
Definition: copy.h:64
Convenience wrapper for the core headers.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
Definition: mailbox.h:223
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:51
void mutt_body_free(struct Body **ptr)
Free a Body.
Definition: body.c:58
Structs that make up an email.
int mutt_file_safe_rename(const char *src, const char *target)
NFS-safe renaming of files.
Definition: file.c:370
DIR * mutt_file_opendir(const char *path, enum MuttOpenDirMode mode)
Open a directory.
Definition: file.c:640
int mutt_file_fsync_close(FILE **fp)
Flush the data, before closing a file (and NULL the pointer)
Definition: file.c:192
@ MUTT_OPENDIR_CREATE
Create the directory if it doesn't exist.
Definition: file.h:75
#define mutt_file_fclose(FP)
Definition: file.h:147
#define mutt_file_fopen(PATH, MODE)
Definition: file.h:146
char * ShortHostname
Short version of the hostname.
Definition: globals.c:39
#define mutt_debug(LEVEL,...)
Definition: logging2.h:89
#define mutt_perror(...)
Definition: logging2.h:93
int maildir_msg_close(struct Mailbox *m, struct Message *msg)
Close an email - Implements MxOps::msg_close() -.
Definition: message.c:608
int maildir_msg_commit(struct Mailbox *m, struct Message *msg)
Save changes to an email - Implements MxOps::msg_commit() -.
Definition: message.c:598
bool maildir_msg_open_new(struct Mailbox *m, struct Message *msg, const struct Email *e)
Open a new message in a Mailbox - Implements MxOps::msg_open_new() -.
Definition: message.c:531
bool maildir_msg_open(struct Mailbox *m, struct Message *msg, struct Email *e)
Open an email message in a Mailbox - Implements MxOps::msg_open() -.
Definition: message.c:504
int maildir_msg_save_hcache(struct Mailbox *m, struct Email *e)
Save message to the header cache - Implements MxOps::msg_save_hcache() -.
Definition: message.c:616
static int maildir_sort_flags(const void *a, const void *b, void *sdata)
Compare two flag characters - Implements sort_t -.
Definition: message.c:61
Maildir Header Cache.
@ LL_DEBUG2
Log at debug level 2.
Definition: logging2.h:44
@ LL_DEBUG1
Log at debug level 1.
Definition: logging2.h:43
struct MaildirEmailData * maildir_edata_get(struct Email *e)
Get the private data for this Email.
Definition: edata.c:64
int maildir_hcache_store(struct HeaderCache *hc, struct Email *e)
Save an Email to the Header Cache.
Definition: hcache.c:155
struct HeaderCache * maildir_hcache_open(struct Mailbox *m)
Open the Header Cache.
Definition: hcache.c:96
int maildir_hcache_delete(struct HeaderCache *hc, struct Email *e)
Delete an Email from the Header Cache.
Definition: hcache.c:81
void maildir_hcache_close(struct HeaderCache **ptr)
Close the Header Cache.
Definition: hcache.c:69
static int maildir_sync_message(struct Mailbox *m, struct Email *e)
Sync an email to a Maildir folder.
Definition: message.c:216
int nm_update_filename(struct Mailbox *m, const char *old_file, const char *new_file, struct Email *e)
Change the filename.
Definition: notmuch.c:1763
int maildir_rewrite_message(struct Mailbox *m, struct Email *e)
Sync a message in an Maildir folder.
Definition: message.c:453
FILE * maildir_open_find_message(const char *folder, const char *msg, char **newname)
Find a message by name.
Definition: message.c:169
static FILE * maildir_open_find_message_dir(const char *folder, const char *unique, const char *subfolder, char **newname)
Find a message in a maildir folder.
Definition: message.c:113
bool maildir_sync_mailbox_message(struct Mailbox *m, struct Email *e, struct HeaderCache *hc)
Save changes to the mailbox.
Definition: message.c:311
void maildir_gen_flags(char *dest, size_t destlen, struct Email *e)
Generate the Maildir flags for an email.
Definition: message.c:72
static int maildir_commit_message(struct Mailbox *m, struct Message *msg, struct Email *e)
Commit a message to a maildir folder.
Definition: message.c:360
mode_t maildir_umask(struct Mailbox *m)
Create a umask from the mailbox directory.
Definition: shared.c:47
void maildir_canon_filename(struct Buffer *dest, const char *src)
Generate the canonical filename for a Maildir folder.
Definition: shared.c:73
#define FREE(x)
Definition: memory.h:45
MH shared functions.
time_t mutt_date_now(void)
Return the number of seconds since the Unix epoch.
Definition: date.c:455
Convenience wrapper for the library headers.
Message logging.
#define _(a)
Definition: message.h:28
char * mutt_str_dup(const char *str)
Copy a string, safely.
Definition: string.c:253
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition: string.c:654
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:575
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
Definition: string.c:274
#define PATH_MAX
Definition: mutt.h:42
int mx_msg_close(struct Mailbox *m, struct Message **ptr)
Close a message.
Definition: mx.c:1178
struct Message * mx_msg_open(struct Mailbox *m, struct Email *e)
Return a stream pointer for a message.
Definition: mx.c:1132
struct Message * mx_msg_open_new(struct Mailbox *m, const struct Email *e, MsgOpenFlags flags)
Open a new message.
Definition: mx.c:1038
API for mailboxes.
#define MUTT_MSG_NO_FLAGS
No flags are set.
Definition: mx.h:39
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
Definition: pool.c:81
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Definition: pool.c:94
Pop-specific Email data.
void mutt_qsort_r(void *base, size_t nmemb, size_t size, sort_t compar, void *sdata)
Sort an array, where the comparator has access to opaque data rather than requiring global variables.
Definition: qsort_r.c:67
uint64_t mutt_rand64(void)
Create a 64-bit random number.
Definition: random.c:122
Assorted sorting methods.
#define mutt_numeric_cmp(a, b)
Definition: sort.h:35
#define NONULL(x)
Definition: string2.h:37
struct Body * parts
parts of a multipart or message/rfc822
Definition: body.h:72
LOFF_T offset
offset where the actual data begins
Definition: body.h:52
LOFF_T length
length (in bytes) of attachment
Definition: body.h:53
String manipulation buffer.
Definition: buffer.h:36
char * dptr
Current read/write position.
Definition: buffer.h:38
char * data
Pointer to data.
Definition: buffer.h:37
The envelope/body of an email.
Definition: email.h:39
bool read
Email is read.
Definition: email.h:50
struct Envelope * env
Envelope information.
Definition: email.h:68
void * edata
Driver-specific data.
Definition: email.h:74
int lines
How many lines in the body of this message?
Definition: email.h:62
struct Body * body
List of MIME parts.
Definition: email.h:69
bool old
Email is seen, but unread.
Definition: email.h:49
bool changed
Email has been edited.
Definition: email.h:77
bool attach_del
Has an attachment marked for deletion.
Definition: email.h:102
bool flagged
Marked important?
Definition: email.h:47
bool replied
Email has been replied to.
Definition: email.h:51
char * path
Path of Email (for local Mailboxes)
Definition: email.h:70
bool deleted
Email is deleted.
Definition: email.h:78
bool trash
Message is marked as trashed on disk (used by the maildir_trash option)
Definition: email.h:53
unsigned char changed
Changed fields, e.g. MUTT_ENV_CHANGED_SUBJECT.
Definition: envelope.h:90
Header Cache.
Definition: lib.h:86
A mailbox.
Definition: mailbox.h:79
enum MailboxType type
Mailbox type.
Definition: mailbox.h:102
Maildir-specific Email data -.
Definition: edata.h:32
A local copy of an email.
Definition: message.h:34
FILE * fp
pointer to the message data
Definition: message.h:35
char * path
path to temp file
Definition: message.h:36
char * committed_path
the final path generated by mx_msg_commit()
Definition: message.h:37
time_t received
Time at which this message was received.
Definition: message.h:46
Container for Accounts, Notifications.
Definition: neomutt.h:41
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:45