m->has_new = false;
#ifdef USE_POP
if (pop_path_probe(m->path, NULL) == MUTT_POP)
+ {
m->magic = MUTT_POP;
+ }
else
#endif
#ifdef USE_NNTP
if ((m->magic == MUTT_NNTP) || (nntp_path_probe(m->path, NULL) == MUTT_NNTP))
+ {
m->magic = MUTT_NNTP;
+ }
+ else
#endif
#ifdef USE_NOTMUCH
if (nm_path_probe(m->path, NULL) == MUTT_NOTMUCH)
+ {
m->magic = MUTT_NOTMUCH;
+ }
else
#endif
if (stat(m->path, &sb) != 0 || (S_ISREG(sb.st_mode) && sb.st_size == 0) ||
/* Reattach the private data */
ctx->mailbox->hdrs[i]->data = edata;
+ ctx->mailbox->hdrs[i]->free_data = free_emaildata;
ret = 0;
hcached = true;
}
/* Reattach the private data */
e->data = edata;
+ e->free_data = free_emaildata;
e->lines = 0;
fgets(buf, sizeof(buf), msg->fp);
return MUTT_UNKNOWN;
if (mutt_str_strncasecmp(path, "pop://", 6) == 0)
- return MUTT_NOTMUCH;
+ return MUTT_POP;
if (mutt_str_strncasecmp(path, "pops://", 7) == 0)
- return MUTT_NOTMUCH;
+ return MUTT_POP;
return MUTT_UNKNOWN;
}