Re: copying and renaming mailboxes to clean up directories

From: Andrew Morgan (no email)
Date: Wed May 02 2007 - 19:51:48 EDT

  • Next message: J.J. Day: "imapd make error"

    On Wed, 2 May 2007, Thorsten Büker wrote:

    > 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?

    You are correct that the message UIDs will change anytime a message is
    copied. Also the mailbox ID will be different for each new mailbox. If
    you want to maintain the seen state during the copy, you'll need a fancier
    script than the one I wrote. :)

    >>> 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.

    If you can figure out the message-IDs to delete, then it should work fine.

             Andy

    ----
    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: J.J. Day: "imapd make error"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD