On Sun, Jun 17, 2007 at 01:24:46PM +0300, Timo Sirainen wrote: > On Fri, 2007-06-15 at 14:07 -0500, Steven F Siirila wrote: > > > Hmm. I wonder how much of a timing window is left; this could be a viable > > > option for us. However, I would like to consider our future options for > > > mailbox formats other than mbox (we will eventually migrate I'm sure). > > > > For the mbox case (our immediate concern) your patch seems perfect, provided > > that it is performing the read of the access time and the re-setting of the > > access time during the time that the INBOX is locked. Timo, is this the > > case? > > That's right.
Great! Will you be incorporating this patch into a future release? (Right now we have incorporated it as a local mod.) > > What we are considering doing is updating our local "mailattrd" to lock > > using the same mechanism Dovecot is before reading the access time: > > > > lock /var/mail/user (open RDONLY, fcntl SETLKW) > > stat /var/mail/user (to get last access time) > > unlock /var/mail/user (close) > > > > Unfortunately, it is more overhead. But it should be 100% accurate. > > That should work. Or I guess you saw my other mail already too? That > doesn't require creating the lock, but should be 100% accurate as well. Since there is no way to "check" the lock for fcntl locks, I think we're left with no choice but to use the above code. Thanks again! -- Steven F. Siirila Office: Lind Hall, Room 130B Internet Services E-mail: [EMAIL PROTECTED] Office of Information Technology Voice: (612) 626-0244 University of Minnesota Fax: (612) 626-7593