[Dovecot] Dovecot LDA munging INBOX access times?
Timo Sirainen
tss at iki.fi
Sat Jun 16 02:01:57 EEST 2007
On Wed, 2007-06-13 at 22:51 -0500, Steven F Siirila wrote:
> > 2) If index files are fully synced, Dovecot writes X-UID: header. It
> > also updates nextuid field in X-IMAP: / X-IMAPbase: header of the first
> > message, which causes Dovecot to read() the file. The nextuid update
> > isn't really required, but I think some other bug shows up if it isn't
> > done.
>
> Do these operations apply to Deliver or just IMAP/POP?
All.
> Not knowing enough about how the indexes work.... Question: Is it possible
> for Deliver to append a message w/o writing an X-UID header, leaving that
> operation to the IMAP/POP client code, and still maintain an updated index?
That's how messages are saved if index files aren't up-to-date. So the
X-UID: adding is just an optimization.
> If not, are there any options I can provide to Dovecot LDA to make it
> function without index file updating?
You could set:
protocol lda {
mail_location = ...:INDEX=MEMORY
}
> What we have is a daemon called "mailattrd" on our mail servers which runs
> on a TCP port and simply does a stat() on a user's mailbox and returns the
> atime, mtime, ctime values of said mailbox.
You could do something like this:
do {
st1 = stat(mbox)
while (mbox.lock exists) wait;
st2 = stat(mbox)
} while (st1.mtime != st2.mtime || st1.atime != st2.atime);
With some small lock timeout value.
> That "service" is used by a
> variety of our applications. We were thinking of another possibility:
> changing Dovecot IMAP/POP to update the last access time (open in READ)
> of a specific file other than the user's INBOX. However, we'd rather not
> maintain local modifications unless absolutely necessary.
Mount with noatime and have Dovecot update the atime itself? I'm not
sure if the patch I sent is enough to update atime always.
> Any thoughts on alternatives which might be mailbox-format-independent?
There aren't really mailbox-independent ways to do this. With maildir
you'd probably stat() new/ and see if atime > ctime.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070616/6d6e43b5/attachment-0001.bin
More information about the dovecot
mailing list