orphaned cyrus mail directories

Hi Folks,
I recently had some help from a consultant with problems on an OSX 10.4 Server machine. After the edits per his direction in WGM and netinfo, it looks like new mailboxes were created for some of the accounts that got fixed. Mail is playing dine but a new problem was created. The old maiboxes are still in /Var/spool/imap/user and are visible in the SA Mail Maintenance GUI window. I can also see the old mail when I checked via terminal.

I have tried a couple of the techniques I found on google and on the discussion board here over the last 24 hours. Tried to cp a piece of orphaned mail to a working mailbox, chown the owner back to cyrusimap and did a reconstruct on the mailbox. No Joy. Also tried reconstruct as pointed out in Apple Art num 107996.
Siradmin app can't get to the abandoned directories either.

The difficulty is that the user accounts in WGM are paired now with the new cyrus mailboxes. The old mailboxes are "abandoned". I thought the fix would be to migrate the mail files to the new mailboxes then reconstruct the cyrus index. That hasn't worked. Needless to say, I have users that want to recover their old mail. Anyone have an idea?

G4, Mac OS X (10.4.10)

Posted on Sep 19, 2007 9:42 AM

Reply
4 replies

Sep 19, 2007 9:52 AM in response to Phil McNamara

Not sure what exactly you did, however moving messages into the new mailboxes and reconstructing should do the trick. Obviously you need to be careful not to overwrite any messages that have the same file name.

I assume whatever changes you made, were because of issues you had before. Maybe some of these issues are causing problems now.

Normally, reconstructing the single user (whose mail you just copied over), should be enough, but if your mail db is broken enough you may need to do a full reconstruction.

Get mailbfr from here: http://osx.topicdesk.com/tools/ and try this:
1. Copy a few orphaned messages into the new mailbox
2. Issue "mailbfr -m username"

See if this helps. If not you may need to reconstruct the whole mail db, but I am not going to recommend this without more info on why you did the changes you mentioned in the first place.

Sep 19, 2007 1:38 PM in response to pterobyte

Thanks for the response.
Some history. One of the fellows at topicdesk helped me one night last week. It seems a number of user accounts were created with unacceptable characters. New accountscreated in WGM were not playing mail. Using WGM and NetInfoManager, the accounts were renamed and re-aliased. It seems that the process in some cases created a whole new mailbox instead of mapping to the same cyrus directory, hence the "orphanded mail".
I did trial cp one item of mail from an orphaned cyrus mailbox into another new and working user mailbox as root. I chowned the file to cyrusimap. I then reconstructed the cyrus index for that user mailbox using the command line referenced for 10.4 server in the apple tech note in the original post. The copied piece of mail was not retreivable with an apple mail. I tried using the apple WGM Maintenanace tab GUI to reconstruct that one new mailbox again. Again no luck retreiving. All I can surmise is that there is some other attribute to the file that was copied that is not allowing the imap client to retrieve the mail.
I will try it again with mailbfr but I expect that I would get the same results as the command line indiviudual reconstruct. Will let you know.
phil

Sep 19, 2007 8:31 PM in response to pterobyte

Thanks Athanasios,
I downloaded and installed mailbfr and ran it against the same mail user (containing the single copied mail item from the orphan directory). It worked! I was able to see and retrieve that mail using mail.app. I guess you have some additional magic in mailbfr.

So to recap what I did
I cp'd the mail file from the orphan directory to the working user directory
I chown'd the owner to cyrusimap
ran mailbfr -m dale_walsh 🙂

You wouldn't happen to know of a script that I could run that would mv all mail files from one source to another target directory. I have about 100 orphan mailboxes affected. Maybe I'll be conservative and say that I should just cp the mail files and then verify with the user that they got all the mail before cleaning out the old orphan direcory - which I am not sure how to do without potentially messing up cyrus.
Thanks again,
Phil Mc

Sep 20, 2007 3:22 AM in response to Phil McNamara

You wouldn't happen to know of a script that I could run that would mv all mail files from one source to another target directory.


No, but just use the cp command with wildcard characters for each mailbox. I know it's a pain, but you'll have better control, since everything seems to be a bit "messy".


cleaning out the old orphan direcory - which I am not sure how to do without potentially messing up cyrus.


Since those mailboxes are not seen by SirAdmin nor any other tool, I'd say they are safe to delete as they are not considered by the cyrus db anymore.

The proper way to delete the contents would be "ipurge" (see "man ipurge"), but this will only work if the mailboxes are still recognised as such.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

orphaned cyrus mail directories

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.