[Dovecot] mbox format and UIDVALIDITY

Axel Luttgens
Wed, 01 Jul 2009 15:48:31 -0000

My base concern may be illustrated with the help of that simple telnet
session:

	# telnet 127.0.0.1 imap
	Trying 127.0.0.1...
	Connected to localhost.
	Escape character is '^]'.
	* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
AUTH=PLAIN] Dovecot ready.
	a1 login testuser ******
	a1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID
ENABLE SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE
CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC
ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH] Logged in
	a2 list "" %
	* LIST (\NoInferiors \UnMarked) "/" "Sent"
	* LIST (\HasNoChildren \UnMarked) "/" "INBOX"
	a2 OK List completed.
	a3 create new1
	a3 OK Create completed.
	a4 create new2
	a4 OK Create completed.
	a5 select new1
	* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
	* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)]
Flags permitted.
	* 0 EXISTS
	* 0 RECENT
	* OK [UIDVALIDITY 1] UIDs valid
	* OK [UIDNEXT 1] Predicted next UID
	* OK [HIGHESTMODSEQ 1]
	a5 OK [READ-WRITE] Select completed.
	a6 select new2
	* OK [CLOSED]
	* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
	* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)]
Flags permitted.
	* 0 EXISTS
	* 0 RECENT
	* OK [UIDVALIDITY 1] UIDs valid
	* OK [UIDNEXT 1] Predicted next UID
	* OK [HIGHESTMODSEQ 1]
	a6 OK [READ-WRITE] Select completed.
	a7 unselect
	a7 OK Unselect completed.
	a8 delete new1
	a8 OK Delete completed.
	a9 delete new2
	a9 OK Delete completed.
	a10 logout
	* BYE Logging out
	a10 OK Logout completed.
	Connection closed by foreign host.

During the whole telnet session, both files "new1" and
"new2" remained
empty (i.e. no pseudo-message written to them), no uidvalidity-related
helper file seems to have been created and no uidvalidity-related
function seems to have been called.
And clearly, both mailboxes "new1" and "new2" have received
the same
UIDVALIDITY.

Those UIDVALIDITYs appear to be persistent; messages may be added to
and deleted from those mailboxes, those mailboxes may be renamed...
their UIDVALIDITY remain unchanged and equal to 1.
In fact, any additional mailbox is created with that unique and
persistent UIDVALIDITY of 1.

Is this supposed to behave that way?

(note that I quickly tried with dovecot 1.1.16 and could observe the
same behavior)

TIA,
Axel

# 1.2.rc7: /usr/local/etc/dovecot.conf
# OS: Darwin 9.7.0 i386
protocols: pop3 imap
ssl: no
disable_plaintext_auth: no
login_dir: /usr/local/var/run/dovecot/login
login_executable(default): /usr/local/dovecot-1.2.rc7/libexec/dovecot/
imap-login
login_executable(imap): /usr/local/dovecot-1.2.rc7/libexec/dovecot/
imap-login
login_executable(pop3): /usr/local/dovecot-1.2.rc7/libexec/dovecot/
pop3-login
mail_max_userip_connections(default): 4
mail_max_userip_connections(imap): 4
mail_max_userip_connections(pop3): 10
first_valid_uid: 2001
mail_location: mbox:~/_mailboxes:INBOX=~/_mailboxes/inbox:CONTROL=~/
_mboxesctrl
mail_debug: yes
mbox_read_locks: flock
mbox_write_locks: flock dotlock
mail_executable(default): /usr/local/dovecot-1.2.rc7/libexec/dovecot/
imap
mail_executable(imap): /usr/local/dovecot-1.2.rc7/libexec/dovecot/imap
mail_executable(pop3): /usr/local/dovecot-1.2.rc7/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/local/dovecot-1.2.rc7/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/dovecot-1.2.rc7/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/dovecot-1.2.rc7/lib/dovecot/pop3
pop3_lock_session(default): no
pop3_lock_session(imap): no
pop3_lock_session(pop3): yes
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): %08Xv%08Xu
auth default:
   debug: yes
   passdb:
     driver: pam
     args: *
   userdb:
     driver: passwd