manipulate files in /var/spool/imap/

Ken Murchison ken at oceana.com
Fri Nov 14 15:46:09 EST 2003


Rajesh Saxena wrote:

> Rob Siemborski wrote:
> 
>> If you do delete the files directly, you will need to reconstruct the
>> mailbox afterwords (and will still have a race condition).
>>
>> It'd be MUCH better to do all the access through IMAP, like you're
>> supposed to ;)
> 
> 
> Thank you both Rob and James for offering suggestions. I will write
> the script to do imap. I tried the reconstruct method just for curiosity
> and I have a quick question. Lets say there is a folder like this:
> 
> /var/spool/imap/user/firstuser/Spam/
> 1. 2. 3. cyrus.cache cyrus.header cyrus.index
> 
> If I delete messages 1. 2. and 3. then run
> $ rm 1. 2. 3. && reconstruct -r user.firstuser.Spam
> 
> Are the next emails which get stored in that directory supposed to be
> 1. 2. 3. or will they be named 4. 5. 6. onwards?

As long as cyrus.index doesn't get trashed, the next new message will be 
4.  IMAP requires that the UIDs of messages are monotonically increasing 
(they can't be reused).  As long as Cyrus knows what the next UID should 
be (which is in cyrus.index) it will conform to the spec.

-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp





More information about the Info-cyrus mailing list