maildir-uidlist.c revision e30b748edcef3cf3352478bf21fa8f785bdc773a
1516N/A/* Copyright (c) 2003-2007 Dovecot authors, see the included COPYING file */ 39N/A Version 1 format has been used for most versions of Dovecot up to v1.0.x. 39N/A It's also compatible with Courier IMAP's courierimapuiddb file. 39N/A header: 1 <uid validity> <next uid> 39N/A entry: <uid> <filename> 39N/A Version 2 format was written by a few development Dovecot versions, but 39N/A v1.0.x still parses the format. The format has <flags> field after <uid>. 39N/A Version 3 format is an extensible format used by Dovecot v1.1 and later. 39N/A It's also parsed by v1.0.2 (and later). The format is: 39N/A header: 3 [<key><value> ...] 926N/A entry: <uid> [<key><value> ...] :<filename> 2238N/A See enum maildir_uidlist_*_ext_key for used keys. 1713N/A/* NFS: How many times to retry reading dovecot-uidlist file if ESTALE 39N/A error occurs in the middle of reading it */ 39N/A/* how many seconds to wait before overriding uidlist.lock */ 72N/A "file_dotlock_create(%s) failed: %m",
path);
72N/A /* the control dir doesn't exist. create it unless the whole 72N/A mailbox was just deleted. */ 72N/A /* make sure we have the latest changes before changing anything */ 2453N/A /* skip over an extension field */ 2339N/A "UIDs not ordered in file %s (%u > %u)",
2453N/A "UID larger than next_uid in file %s (%u >= %u)",
2453N/A /* This can happen if expunged file is moved back and the file 2453N/A was appended to uidlist. */ 2453N/A /* Replace the old record with this new one */ 926N/A /* I/O error / empty file */ 2453N/A "%s: Corrupted header (invalid version number)",
838N/A "%s: Corrupted header (version 1)",
111N/A "%s: next_uid was lowered (v1, %u -> %u)",
1970N/A "%s: Broken header (uidvalidity = %u, next_uid=%u)",
39N/A "%s: next_uid was lowered (%u -> %u)",
1100N/A /* NFS: either the file hasn't been changed, or it has already 1100N/A been deleted and the inodes just happen to be the same. 1100N/A check if the fd is still valid. */ 941N/A /* file modified but not recreated */ 1007N/A /* ESTALE - try reopening and rereading */ 1007N/A /* first time we need to read uidlist */ 1636N/A /* the uidlist doesn't exist. */ 1044N/A /* copy existing extensions, except for the one we're updating */ 956N/A /* the control dir doesn't exist. create it unless the whole 956N/A mailbox was just deleted. */ 2073N/A "rename(%s, %s) failed: %m",
2035N/A /* saving a message to a newly created maildir. */ 956N/A /* initially mark all nonsynced */ 2453N/A "maildir_uidlist_sync",
16384);
956N/A /* we'll update uidlist directly */ 956N/A /* doesn't exist in uidlist */ 1507N/A /* we can't add it, so just ignore it */ 2026N/A /* first time reading the uidlist */ 964N/A /* possibly duplicate */ 1045N/A /* probably was in new/ and now we're seeing it in cur/. 1045N/A to check for duplicates. */ 2284N/A /* didn't exist in uidlist, it's recent */ /* sort new files and assign UIDs for them */ /* buffer is unsorted, sort it by UID */