Subject: reappearing mail in POP (unix->mbx)

From: Andrew Daviel <[email-masked]>
Date: Wed, 27 Sep 2000 12:05:56 -0700 (PDT)

I have converted the mail folders and inboxes on our Linux server from
Unix to MBX format in an attempt to squeeze a bit more performance
from it. (I'm not so sure it is better; more about that later)

After some tinkering, I made a script to do this on the live system, along
the lines of:

for each user:
 - kill imapd, if any, for that user
 - move the spool file away
 - run mbxcvt on the moved spool
 - install a .procmailrc file to use dmail
 - if any mail arrived while converting:
   - convert the new spool to a temporary box
   - mbxcopy mail from the temporary box to INBOX
 - if everything worked, delete the moved spool

If I didn't kill imapd and move the spool away, something (imapd
under control of the users client, I guess) would duplicate all the
mail onto the end of the new inbox. Anyhow, this procedure worked OK
with local Pine (not that there are any local users), and IMAP users,
who hopefully didn't notice.

However, some POP users who have "leave mail on server" had 
all their "read" email reappear when they next connected.
I have tried to understand what is happening with only limited success.
When they retrieved it the last time, the Old and Read status flags
got set, and were preserved by mbxcvt. However, their client (Netscape,
Eudora..) doesn't seem to use this information, and thinks the
mail is unread.
The damage is done, and I don't suppose I will be doing this again, but 
I'd like to understand how this could have been avoided .

Andrew Daviel, TRIUMF, Canada
Tel. +1 (604) 222-7376
[email-masked]
PGP ID 0xC7624B49

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Wed, 27 Sep 2000 22:46:45 -0700 (PDT)

Converting mailboxes from one format to another results in a new unique
identifier epoch, and new unique identifiers assigned to each message.  Since
UIDs are the only way that POP clients can decide what is new mail, that's why
your POP users saw the duplication.

Modern versions of both Netscape and Eudora support IMAP, so these users
should be encouraged to use IMAP instead of POP.