At 11:16 PM Thursday 4/1/99, Miquel van Smoorenburg wrote:
>I have just converted all of our 8000+ users to maildir format. We
>don't use qmail but we do use maildir folders using our own MDA.
>The mail is delivered in /var/spool/mail/username/

>Now, with a bit of thinking I found out that this isn't nessecary at
>all. The modification time on the tmp/ directory indicates when a new
>message was last delivered, since that always goes through tmp/.
>The access time on the new/ directory (set by readdir()) indicates when
>a mail program last checked the maildir mbox. So, a complete scan
>of new/ and cur/ stat()ing all files isn't nessecary at all.
>
>However, since quite a few existing programs take the scanning approach,
>they change the access-time on the new/ directory making the above described
>approach invalid.

But mtime and atime are different right?

>Would it be possible to define the method I decribed above as "the"
>method to check for new mail (for shells, status bars etc) and to also
>define that programs that actually scan cur/ and new/ should use utime()
>to reset the access time on those directories after the scan?

Probably better not to have scanners invoking additional I/O if they can 
avoid it (and they may not have +w access).

Making it "the" method would be interesting. If you are using your own MDA, 
then it's pretty hard to argue why you don't just touch a .new file or some 
such. And of course for those people who need it with mail-local, a 

| touch .new

in a .qmail works just fine.

Not saying that you haven't a good idea, just that there are ways of 
achieving this already for those people who need it and (speculation) with 
declining direct shell access vs POP/IMAP. adding this requirement certainly 
doesn't fall into the category of everyone needing it.

>[If so I could contact the authors of maildir-aware applications to
> make sure they use that method]

Good idea.


Regards.

Reply via email to