> >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
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 :-(
procmail mailing list