|Version 3 (modified by pdmef, 4 years ago) (diff)|
This page collects ideas about a new mail detection/handling overhaul.
There seem to be the following major workflows we want to support:
- a folder with new mail has new mail if and only if it hasn't been opened/closed by mutt since last new mail delivery
- a folder with new mail always has the new mail flag regardless if opened or not
From discussion it seems people use different ways to remind themselves of things to be still looked at.
I can't tell for the former what a good use case is.
For the latter, a mailbox-to-be-processed is one with a new mail flag. Otherwise flagging or marking messages as old identify mail to be defered for now because it makes the new mail flag for the mailbox disappear. Due to being flagged/marked as old they can later still be identified as to those needing to be looked at.
Starting with 1.5.20 we do the latter for all folders. However, many mbox users seem to miss the old behaviour and consider the new one an outright bug. This is exactly the opposite for maildir/mh users.
An option should be added that toggles between both; not sure about a default value as one group or the other will get changed behaviour by default. Inspecting $mbox_type sounds wrong.
For mbox/mmdf, the change would trivial, simply avoid looking for a new message in mbox_reset_atime().
For maildir, it could be implemented by changing the buffy check to report new mail only if we have a message with a mtime greater than the last check time in new/. The drawback is that this has the potential to slow things down depending on how many messages we have in new/ and many "seen" messages we need to skip (usually the first hit using readdir() reveals a non-trashed one so we can abort). Or we can use the mtime of new/ subdirectory if that's reliable enough (i.e. don't start looking if it's <= last time checked).
If the above is handled somehow, the only place where new mail reporting/detection is different is when appending a new message to a folder from within mutt. For mbox/mmdf it doesn't raise the new mail flag, for maildir/mh it does.
This should be solved for 1.6.