Hi Andy,

> You will probably find interest in reading the following thread:

Oh yes, I do :)

> Sam of Courier-IMAP claimed that OpenBSD's random pid assignment broke
> qmail and Courier-IMAP. It certainly broke Courier-IMAP.

IMHO, it broke qmail, too. From the maildir definition:

"Old-fashioned delivery identifiers use the following formats:

* n, where n is the process ID, and where this process has been forked
to make one delivery. Unfortunately, some foolish operating systems
repeat process IDs quickly, breaking the standard time+pid combination."

Replace "some foolish operating systems" with (at least) OpenBSD, and
you've got it. Anyway, qmail itself still uses
<unixtime>.<pid>.<hostname> as the identifier when writing no mails,
thus it gets as mousetrapped as Courier IMAP itself, doesn't it?

However, that's not your part of the story. Here's my idea:

If moving a message from one Maildir to another Maildir, and if you have
to create the message in "new" instead of "cur" there, doesn't it behave
like a completely now delivery to that Maildir?

If it does - aren't you free to change not only the info part from the
filename, but also the uniq part? If it's a new delivery, you're the
delivery agent, and it's your duty to find a good identifier.

That way, you'd be able to introduce "more unique" identifiers, such as
microseconds (but who guarantees OpenBSD wouldn't repeat the same PID
within a single microsecond?) or the unix_sequencenumber() mentioned on
the Maildir definition, which would eliminate the need to wait a second
before moving from "new" to "cur".

Jonas


Reply via email to