hi all, this is needed to make the pop3_reuse_xuidl option work in 1.0alpha4. I am using maildir and I noticed that for each message which doesn't have an indexed X-UIDL header, the entire message is read from disk. as this is reading only headers, it is probably reasonable to stop reading at the end of the headers. it would also be neat if dovecot could be configured to only try reading X-UIDL headers from messages if the mailbox indexes don't exist, since I guess it would be common to want to preserve existing X-UIDLs but not bother for new messages (perhaps some mtime comparison, or something). opinions? I haven't looked at the source enough yet to be able to do this, but these two optimizations would vastly reduce the amount of disk IO as a result of using this option. grant. [apologies if this shows up twice, I originally sent it from an address which isn't subscribed, and it got held] --- src/pop3/commands.c.orig 2005-10-17 02:21:39.000000000 +1000 +++ src/pop3/commands.c 2005-11-09 15:26:15.000000000 +1100 @@ -567,6 +567,8 @@ mail_get_first_header(ctx->mail, "X-UIDL"); if (uidl == NULL) var_expand(str, uidl_format, tab); + else + str_append(str, uidl); ret = client_send_line(client, "%s", str_c(str)); t_pop();
On Fri, 2005-11-11 at 16:38 +1100, grant beattie wrote:> this is needed to make the pop3_reuse_xuidl option work in 1.0alpha4.Committed to CVS finally.> I am using maildir and I noticed that for each message which doesn't > have an indexed X-UIDL header, the entire message is read from disk. > as this is reading only headers, it is probably reasonable to stop > reading at the end of the headers.I don't think it reads the message body because of that? If message size isn't yet in cache file, the body needs to be read to get the correct size with CR+LF linefeeds.> it would also be neat if dovecot could be configured to only try > reading X-UIDL headers from messages if the mailbox indexes don't > exist, since I guess it would be common to want to preserve existing > X-UIDLs but not bother for new messages (perhaps some mtime > comparison, or something). > > opinions? I haven't looked at the source enough yet to be able to do > this, but these two optimizations would vastly reduce the amount of > disk IO as a result of using this option.Well, I originally thought the setting would only be used with mboxes since it's mostly for backwards compatibility, and with mboxes reading X-UIDL always is much cheaper. What maildir pop3 servers exist that don't use the filename or IMAP UIDs in some way for the UIDL? Actually since the message size needs to be read anyway (unless you can get it to be written as W=1234 in maildir file), the X-UIDL lookup shouldn't cost anything since it's written to cache file immediately. Except I'm not sure if Dovecot's caching code currently is smart enough to save the X-UIDL header while saving message sizes.. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20051206/4453ec11/attachment.bin>