<<< Date Index >>>     <<< Thread Index >>>

mark_old



Hello, I would like to follow yesterday conversation on irc with brendan
and another guy, which nick I forgot (sorry).

Whole thing was about how imap mailbox should behave regarding to new
and old mail. I believe that the consensus was to make all mailboxes
(mbox, maildir, imap) behave in the same way if possible. So I tried
little experiment to see differences between mbox, maildir and imap. I
don't have easy access to pop3 right now, so I can't try.

First define what is new, old and read mail
New mail
  - mail with flag N
  - usually just arrived email
Old mail
  - mail with flag O
  - mail you allready know that arrived, but you haven't read it yet
Read mail
  - mail without any flag


This was my testing muttrc:
set folder = ~/abcde
set spoolfile = +INBOX
set mbox=+mbox
mailboxes +INBOX +mbox
set mark_old = yes/no

I had two mailboxes:
INBOX - contains one new mail
mbox - contains two new mails
- for IMAP I used real mailbox, with real messages in INBOX and mbox


MAILBOX
=======

Mailbox - mark_old=no               Mailbox - mark_old=yes            
After exec                          After exec                        
  you can see one new mail            you can see one new mail        
  c - offers mbox                     c - offers mbox                 
in mbox                             in mbox                           
  you can see two new mails there     you can see two new mails there 
  c - offers INBOX                    c - OFFERS INBOX                
in INBOX again                      in INBOX again                    
  you can see one new email there     you can see one OLD email there 
  c - offers mbox                     c - OFFERS MBOX                 
in mbox again                       in mbox again                     
  you can see two new mails there     you can see two OLD mails there 
After quit and new exec             After quit and new exec           
  you can see one new mail there      you can see one OLD mail there  

I think that this is not consistent with manual:

12. Defining mailboxes which receive mail
...
When changing folders, pressing space will cycle through folders with
new mail.
...

Imo mutt should not offer mailboxes with contain old (yet unread mail).



MAILDIR
=======

Maildir - mark_old=no               Maildir - mark_old=yes            
After exec                          After exec                        
  you can see one new mail            you can see one new mail        
  c - offers mbox                     c - offers mbox                 
in mbox                             in mbox                           
  you can see two new mails there     you can see two new mails there 
  c - offers INBOX                    c - does not offer anything     
in INBOX again                      in INBOX again                    
  you can see one new email there     you can see one OLD email there 
  c - offers mbox                     c - does not offer anything     
in mbox again                       in mbox again                     
  you can see two new mails there     you can see two OLD mails there 
After quit and new exec             After quit and new exec           
  you can see one new mail there      you can see one OLD mail there  

Imo this is the way it should (== I like it to :)) be.


IMAP
====

For imap I did the following patch, so that it uses the mark_old option.
Thanks brendan for pointing me to the place.

diff -d -u -r3.39 command.c
--- imap/command.c      26 May 2006 16:38:18 -0000      3.39
+++ imap/command.c      29 May 2006 11:26:23 -0000
@@ -848,7 +848,7 @@
         dprint (2, (debugfile, "Found %s in buffy list (OV: %d ON: %d U: 
%d)\n",
                     mailbox, olduv, oldun, status->unseen));
         
-        if (olduv && olduv == status->uidvalidity)
+        if (olduv && olduv == status->uidvalidity && option(OPTMARKOLD))
         {
           if (oldun < status->uidnext)
           {


IMAP - mark_old=no                  IMAP - mark_old=yes (or without the 
attached patch) 
After exec                          After exec                                  
        
  you can see new mails               you can see new mails                     
        
  c - offers mbox                     c - offers mbox                           
        
in mbox                             in mbox                                     
        
  you can see new mails there         you can see new mails there               
        
  c - offers INBOX                    c - does not offer anything               
        
in INBOX again                      in INBOX again                              
        
  you can see new emails there        you can see OLD emails there              
        
  c - offers mbox                     c - does not offer anything               
        
in mbox again                       in mbox again                               
        
  you can see new mails there         you can see OLD mails there               
        
After quit and new exec             After quit and new exec                     
        
  you can see one new mails there     you can see OLD mails there               
        

With the pathch imap behaves exactly as maildir.

Brendan rose the concern, if there are not some corner cases, when the
mailbox is read only. I can't simulate this with imap. Even if this
corner case contains some incosistency, I would consider adding the
mark_old setting to imap implementation.

If you got to this point, thank you for reading this huge email :)

--
        Vladimir

Attachment: pgpCbrQI2WsBi.pgp
Description: PGP signature