Your issues with read-only mix mailboxes are addressed in the current
imap-2006g development snapshot on
ftp://ftp.cac.washington.edu/mail/imap-2006g.DEV.tar.Z
There were two problems:
. readwrite open did not fall through to readonly open. The IMAP
specification requires the fall through.
. due to a bug, a failed metadata open would close stdin and thus
lead to an application failure.
For your convenience, the following patch will update the imap-2006f
version of mix.c:
*** /usr/src/local/mail/src/old/imap-2006f/src/osdep/unix/mix.c 2007-01-18
14:49:14.000000000 -0800
--- /usr/src/local/mail/src/imap-2006g/src/osdep/unix/mix.c 2007-03-10
11:36:35.000000000 -0800
***************
*** 23,29 ****
* Internet: [EMAIL PROTECTED]
*
* Date: 1 March 2006
! * Last Edited: 18 January 2007
*/
--- 23,29 ----
* Internet: [EMAIL PROTECTED]
*
* Date: 1 March 2006
! * Last Edited: 10 March 2007
*/
***************
*** 612,621 ****
LOCAL->buflen = CHUNKSIZE - 1;
/* get directory name */
LOCAL->dir = cpystr (mix_dir (LOCAL->buf,stream->mailbox));
! /* open metadata file */
! if (((LOCAL->mfd = open (mix_file (LOCAL->buf,LOCAL->dir,MIXMETA),
! stream->rdonly ? O_RDONLY : O_RDWR,NIL)) < 0) ||
! flock (LOCAL->mfd,LOCK_SH)) {
MM_LOG ("Error opening mix metadata file",ERROR);
mix_close (stream,NIL);
stream = NIL; /* open fails */
--- 612,625 ----
LOCAL->buflen = CHUNKSIZE - 1;
/* get directory name */
LOCAL->dir = cpystr (mix_dir (LOCAL->buf,stream->mailbox));
! LOCAL->msgfd = -1; /* currently no file open */
! if (!(((!stream->rdonly && /* open metadata file */
! ((LOCAL->mfd = open (mix_file (LOCAL->buf,LOCAL->dir,MIXMETA),
! O_RDWR,NIL)) >= 0)) ||
! ((stream->rdonly = T) &&
! ((LOCAL->mfd = open (mix_file (LOCAL->buf,LOCAL->dir,MIXMETA),
! O_RDONLY,NIL)) >= 0))) &&
! !flock (LOCAL->mfd,LOCK_SH))) {
MM_LOG ("Error opening mix metadata file",ERROR);
mix_close (stream,NIL);
stream = NIL; /* open fails */
***************
*** 624,630 ****
LOCAL->index = cpystr (mix_file (LOCAL->buf,LOCAL->dir,MIXINDEX));
LOCAL->status = cpystr (mix_file (LOCAL->buf,LOCAL->dir,MIXSTATUS));
LOCAL->sortcache = cpystr (mix_file (LOCAL->buf,LOCAL->dir,MIXSORTCACHE));
- LOCAL->msgfd = -1; /* currently no file open */
stream->sequence++; /* bump sequence number */
/* parse mailbox */
stream->nmsgs = stream->recent = 0;
--- 628,633 ----
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw