Re: copying and renaming mailboxes to clean up directories

From: Thorsten Büker (no email)
Date: Wed May 02 2007 - 17:49:40 EDT

  • Next message: Andrew Morgan: "Re: copying and renaming mailboxes to clean up directories"

    Dear Any, dear list,

    > Hmm, I'm using v2.2.13 here. Maybe that option/feature didn't exist in
    > 2.1.x.

    The manuals I just checked gave no hint on the necessary version.

    > You should probably check if other message flags (Important, Answered,
    > etc) are copied. I can't remember.

    At least "answered" would be nice, from that reason I currently tend to
    the proceeding via Message-ID lines.

    > Have a look at any cyrus.header file and you'll see something like:
    >
    > ----------------------------------
    > Cyrus mailbox header
    > "The best thing about this system was that it had lots of goals."
    > --Jim Morris on Andrew
    > user.morgan 3e671c013f511626
    > morgan lrswipcda
    > ----------------------------------
    >
    > The string "3e671c013f511626" is the unique mailbox ID for this particular
    > mailbox. It is the key value used in the seen files to track which
    > message UIDs have been seen for each mailbox.

    Thanks for this clearification! After comparing some cyrus.header files
    from different folders and "my" seen file, I think I understood ;-)

    While copying the mailbox the message UIDs change, at least as far as I
    can see. So, one might be able to replace the mailbox IDs in the seen
    file be the mailbox IDs of the copied version, but the message UIDs
    referenced to are out-dated. Or do I miss something?

    >> Another attempt:
    >> Are there any reasons, why something like
    >>
    >> ORIG=`grep -R -e '^Message-ID:' $originalmbox | awk '{print $2}' | sort`
    >> KOPIE=`grep -R -e '^Message-ID:' $copyofmbox | awk '{print $2}' | sort`
    >>
    >> some diff and some improved awking (spaces won't work in case of spaces in
    >> folder names) is not a sufficient way to create a list of files, which might
    >> be deleted in the original mailbox?
    >
    > That sounds like a reasonable approach, but obviously you should be
    > careful anytime you modify the cyrus files directly. :)

    Well, actually only the files/message themselves are touched. Ok,
    they're not simply touched but deleted ;-)
    Further Cyrus files (cyrus.*, seen state, subscription list)
    are not affected. Furthermore one might assume that they correspond to
    the mailbox contents after deleting any "wrong" files/messages.

    I hope to find a reasonable approach to create a list of unnecessary
    Message-IDs and their corresponding files, which might be piped to
    remove. Keep you informed.

    kind regards, thanks again,
       Thorsten

    ----
    Cyrus Home Page: http://cyrusimap.web.cmu.edu/
    Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
    List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
    

  • Next message: Andrew Morgan: "Re: copying and renaming mailboxes to clean up directories"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD