+--- a/browser.c
++++ b/browser.c
+@@ -32,6 +32,7 @@
+ #ifdef USE_IMAP
+ #include "imap.h"
+ #endif
++#include "mx.h"
+
+ #include <stdlib.h>
+ #include <dirent.h>
+@@ -307,8 +308,10 @@ folder_format_str (char *dest, size_t de
+ }
+
+ static void add_folder (MUTTMENU *m, struct browser_state *state,
+- const char *name, const struct stat *s, int new)
++ const char *name, /*DEB const IAN*/ struct stat *s, BUFFY *mbuf)
+ {
++ int new = (mbuf) ? mbuf->new : 0;
++
+ if (state->entrylen == state->entrymax)
+ {
+ /* need to allocate more space */
+@@ -320,6 +323,9 @@ static void add_folder (MUTTMENU *m, str
+ m->data = state->entry;
+ }
+
++ if (mbuf && mbuf->magic == M_MAILDIR && mbuf->mtime)
++ s->st_mtime = mbuf->mtime;
++
+ if (s != NULL)
+ {
+ (state->entry)[state->entrylen].mode = s->st_mode;
+@@ -414,7 +420,7 @@ static int examine_directory (MUTTMENU *
+ tmp = Incoming;
+ while (tmp && mutt_strcmp (buffer, tmp->path))
+ tmp = tmp->next;
+- add_folder (menu, state, de->d_name, &s, (tmp) ? tmp->new : 0);
++ add_folder (menu, state, de->d_name, &s, tmp);
+ }
+ closedir (dp);
+ browser_sort (state);
+@@ -438,14 +444,15 @@ static int examine_mailboxes (MUTTMENU *
+ if (mx_is_imap (tmp->path))
+ {
+ imap_mailbox_state (tmp->path, &mbox);
+- add_folder (menu, state, tmp->path, NULL, mbox.new);
++ tmp->new = mbox.new;
++ add_folder (menu, state, tmp->path, NULL, tmp);
+ continue;
+ }
+ #endif
+ #ifdef USE_POP
+ if (mx_is_pop (tmp->path))
+ {
+- add_folder (menu, state, tmp->path, NULL, tmp->new);
++ add_folder (menu, state, tmp->path, NULL, tmp);
+ continue;
+ }
+ #endif
+@@ -459,7 +466,7 @@ static int examine_mailboxes (MUTTMENU *
+ strfcpy (buffer, NONULL(tmp->path), sizeof (buffer));
+ mutt_pretty_mailbox (buffer);
+
+- add_folder (menu, state, buffer, &s, tmp->new);
++ add_folder (menu, state, buffer, &s, tmp);
+ }
+ while ((tmp = tmp->next));
+ browser_sort (state);
+--- a/buffy.h
++++ b/buffy.h
+@@ -25,6 +25,7 @@ typedef struct buffy_t
+ char *path;
+ long size;
+ struct buffy_t *next;
++ time_t mtime; /* for maildirs...time of newest entry */
+ short new; /* mailbox has new mail */
+ short notified; /* user has been notified */
+ short magic; /* mailbox type */
+--- a/PATCHES
++++ b/PATCHES
+@@ -0,0 +1 @@
++patch-1.5.6.dw.maildir-mtime.1