leahneukirchen / mblaze

Unix utilities to deal with Maildir
Other
441 stars 48 forks source link

mlist -i ignores mails in maildir/new #164

Closed semarie closed 4 years ago

semarie commented 5 years ago

Filenames in maidir/new doesn't have maildir info part. The format is uniq and not uniq:info according to https://cr.yp.to/proto/maildir.html .

But mlist -i skips file entries if it doesn't contains ":2," substring, resulting ignoring any message in maildir/new.

The following commands permits to reproduce the problem:

# create maildir with few messages
$ mkdir -p maildir/{new,tmp,cur}
$ touch maildir/cur/1325341040.3.localhost:2, maildir/new/1325341040.1.localhost maildir/new/1325341040.2.localhost

$ mlist maildir
maildir/cur/1325341040.3.localhost:2,
maildir/new/1325341040.1.localhost
maildir/new/1325341040.2.localhost

$ mlist -i maildir
     1 unseen    0 flagged       1 msg  maildir

mlist -i reports only 1 message (instead of 3) and 1 unseen (instead of 3).