procmail
[Top] [All Lists]

Re: Maildir/ support looks a bit wierd

2000-12-14 03:43:34

   >  >1) Sort the messages according to the time they were delivered by
   >  >   sorting them by filename (since the first item in the name is
   >  >   a timestamp)
   >
   >  Unfortunately, it's the _wrong_ timestamp: it's the time seen by the
   >  _client_ at the _start_ of delivery.  If you want the actual delivery
   >  time (when the message was moved from the tmp dir to the new dir), you
   >  need to check the mtime on the file instead.  Shell scripts can easily
   >  do this by using "ls -t" instead of "ls".
   >
   >  Any program that thinks the time included in the filename is useful is
   >  wrong.


Strictly speaking, even the mtime is wrong - it is the time the file was
last written to. The correct time, as you say, is the time when the message
was moved from the tmp dir to the new dir, but this time is not recorded
anywhere (except in mtime on the parent directory). There is no guarantee
that the OS did not stop the delivering process for some amount of time
after it finished writing to the file and before it could do the move.
But 99.99% of the time of course, the mtime is so close to the actual
delivery time that the difference doesn't matter. And the `standard' tells
us to use the mtime.


   >  The maildir standard was a great idea, but it was poorly worded and now
   >  we see the result: poor interoperability.  I will change procmail if
   >  and when a clear maildir standard is written.


One problem is that people might switch from procmail to competing
programs like `maildrop' (www.flounder.net/~mrsam/maildrop/) from the
Courier mail system. Then procmail will be the program that does things
by the book, but maildrop will be the program that people use :-(

-- 
Gjermund Sorseth
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail