Re-UID each mail
florent at peterschmitt.fr
Sun Sep 14 08:51:01 EDT 2014
Doh, Thank You very much.
I realized I used bad values for CRC32 update. I used your script to
find file version and then correct CRC32 field.
I can now do whatever I want ;)
Le 14/09/2014 07:47, Bron Gondwana a écrit :
> On Sun, Sep 14, 2014, at 07:23 AM, Florent Peterschmitt wrote:
>> I'm getting into something a little too tricky for me (== don't have
>> time to investigate enough) : I want to modify cyrus.index files to
>> change UIDs of all messages in a mailbox.
> You can't just do that unless you rename the message files as well.
>> For now, I have a tiny python script that can change any header value,
>> but where I'm stuck is for any other header which value depends of others.
>> Like all CRC ones, for example.
> Yep, they are an extra level of trickyness for sure.
>> For now, I tested by sending two mails. So their UID are 1 and 2.
>> After the script, 1 is 2 and 2 is 3.
>> I've mv each mail to get the correct name.
> Ahh, OK. That helps. It's really not ideal to do this though, so I wonder why
> you are even trying?
>> But now (I knew it would not be so easy), no mail (0 exists, 0 recent).
> I wouldn't be surprised to see IO errors in the logs too. We're not as diligent
> at checking the error codes from parsing index records as we could be
> everywhere in the code - many of the read paths just skip invalid records,
> hence the zero exists.
> I have a perl module that does roughly what you are doing there, and it
> can even re-calculate the CRCs...
> Or you can just look in mailbox.c at mailbox_index_record_to_buf and friends
> in the Cyrus source code.
Florent Peterschmitt | Please:
florent at peterschmitt.fr | * Avoid HTML/RTF in E-mail.
http://florent.peterschmitt.fr | * Send PDF for documents.
Proudly powered by FLOSS | * Trim your quotations. Really.
| Thank you :)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: OpenPGP digital signature
Url : http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20140914/2f5ccb8c/attachment.bin
More information about the Cyrus-devel