From mboxrd@z Thu Jan 1 00:00:00 1970 From: marka@pobox.com (Mark Alexander) Date: Tue, 28 Apr 2009 19:29:46 -0400 Subject: [sup-talk] Possible problem with maildir ID generation In-Reply-To: <20090428191822.GB10581@cabinet.hsd1.ma.comcast.net> References: <1240320547-sup-6957@entry> <20090428191822.GB10581@cabinet.hsd1.ma.comcast.net> Message-ID: On Tue, Apr 28, 2009 at 3:18 PM, Marc Hartstein wrote: > Isn't part of the maildir scheme that the filenames are guaranteed to be > unique? ?It's been a while since I looked at this part of the sup > source, but would it be possible to simply use the filename as the ID > when working with maildir, rather than generating a new ID? ?Or is there > an additional constraint (like ordering?) that needs to be satisfied and > isn't by maildir? Maildir filenames are unique, but they would need to be ordered by time, since sup depends on that ordering (look in maildir.rb for where it uses sort). I'm not sure if mail delivery programs (I use procmail) guarantee that the filenames are ordered that way. I will say that the patch I sent out for maildir.rb has made my life a lot happier, but it's still not ideal because of the race condition I mentioned. William was talking about using some other scheme to generate IDs. We should see what he has to say about this.