* Mark: when MIX is released and we work on migrating users to it, will it be at all possible to convert an mbx -> mix and preserve both the UIDs and the UID Validity settings? I know you have -kwcopy in the new mailutil. Can it be possible to do something similar for uid/uidvalidity?

It isn't be possible to do this with the distributed version of mailutil. I consider it to be too special purpose, and too dangerous, to be something that I am comfortable with putting in the distributed version. However, it shouldn't be a particularly difficult change to make as a local hack.

For example, the following is a disgusting kludge, but it should do the trick. You probably want to do this in a separate copy of the source code just for this special hacked version of mailutil.

(1) Create two new global variables in mailutil.c, newuidvalidity and newuidlast.

(2) Early in routine mbxcopy() in mailutil.c, do
  newuidvalidity = source->uid_validity;
  newuidlast = source->uid_last;

(3) In mix.c, prototype newuidvalidity and newuidlast as extern.

(4) In mix_create() in mix.c, change
  fprintf (f,MTAFMT,now,0,now);
to
  fprintf (f,MTAFMT,newuidvalidity,0,now);

(5) Finally, in mix_append(), just before the lines that read:
          ret = (mix_meta_update (astream) &&
                 mix_index_update (astream,&idxf,LONGT) &&
                 mix_status_update (astream,&statf,LONGT));
add
if (astream->uid_last <= newuidlast) aastream->uid_last = newuidlast;



I have this going and it works fine. However, it does not preserve the UIDs in the process. Is there another line that can be added to preserve the UIDs so that the preserved UID Validity makes sense?

Thanks,
-Erik Kangas

_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to