Broken Mailbox / omcontain / new accs only work with webmail

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

kanderson

Postby kanderson » Thu Jan 10, 2008 12:17 pm

Scalix creates an imap-cache to speed up access for imap folder. Yours is corrupt. It's not overly common, but it's certainly not unheard of either. The fix is easy and fast.

First, make sure the user is signed out.

omstatu -u rci -c|grep -i <username>

If they're still logged in, have then log out. Note that it's common for a connection to be held open for a while after they sign out. Again, this is done to improve performance. If you see that happening, kill -9 it. The above command will give you a Process ID number you can use to kill it.

Then

omshowu -f <username>

This will show the user's folder. ~/user/g000037/00000v8:1. is mine for example.

So go to that folder.

cd /var/opt/scalix/??/s/user/g000037

in there are 2 directories. one is imap-cache, the other is 00000v8.ofs. Delete everything in both of those folders, but not the folders themselves.

rm imap-cache/*
rm 00000v8.ofs/*

That's it. Have the user sign back in, and I suspect you'll find that all is well.

madk
Posts: 13
Joined: Wed Dec 19, 2007 3:39 pm

Postby madk » Thu Jan 10, 2008 12:42 pm

thx for ur reply, but that did not help, at least not with the broken user.
i already deleted the content of imap-cache for every user 2day, but not the content of 00000v8.ofs. I just stopped scalix, emptyd both directories for all users and startet it again.

maybe this helped with the OM 24070 Error spamming the fatal log. (Hopefully, yesterday i deleted a 23GiB!! fatal log :-), which grew in only 10 days. )

kanderson

Postby kanderson » Thu Jan 10, 2008 3:07 pm

Errr. What's in the fatal log? I don't think mine is that big since the server was initially installed years ago...

mikethebike
Posts: 566
Joined: Mon Nov 28, 2005 4:16 pm
Location: England

Postby mikethebike » Thu Jan 10, 2008 4:11 pm

madk,

I would also make sure that you stop the imap service...there is where your problem may lay after removing the imap-cache contents.

Mick

madk
Posts: 13
Joined: Wed Dec 19, 2007 3:39 pm

Postby madk » Thu Jan 10, 2008 4:18 pm

kanderson:
ERROR IMAP Server Da(IMAP Server Pr) Thu Jan 10 16:51:33 2008
[OM 24070] Debug message for Lab use :
imapMimeUpdateCRecNums: Could not open/read container
User Name: Username / mailnodename/CN=Username
Pid of logging process: 28534


just a million times... and its always only one or two users who are in the fatal log, but never the same, eg. 2 users all the time, then i empty the cache, and tada it starts with one or two different users.

mikethebike: i always made sure that no process, not only not the imap process, was accessing the user dir. and when i emptyd the cache dirs from all users at once i had scarlix shutdown and no imap process was running at all.

thx again for putting that much thought into my problem guys ;)

kanderson

Postby kanderson » Thu Jan 10, 2008 5:27 pm

Just cause I'm curious, can you run

omcheck -s -d >> tmp/permcheck.sh

Then take a look in permcheck to make sure that it all looks correct? This is a bit of a shot in the dark, but lets try it. If you see something in there, you can run it with "bash /tmp/permcheck.sh".

Note that it'll take a LONG time to complete. That's normal. It'll have a performance hit too, so I'd recommend running it when you leave for the night. By the next day it'll have completed, and you can decide how to proceed from there.

Kev.

madk
Posts: 13
Joined: Wed Dec 19, 2007 3:39 pm

Postby madk » Fri Jan 11, 2008 4:15 am

already did run that yesterday and the day before, it found perms to fix both times. but fixing the permissions didnt seem to have any effect though.

and the following error keeps occuring along with the one i already posted:


[OM 3433] The open container reference provided is invalid.

mikethebike
Posts: 566
Joined: Mon Nov 28, 2005 4:16 pm
Location: England

Postby mikethebike » Fri Jan 11, 2008 8:05 am

madk,

I do not have a server here with me to check, but I would suggest increasing the event log level for the IMAP service to see if you can capture anything.

omconflvl -a imap 11

Make an imap connection, then straight away

omshowlog -p 3 -l 11 > /tmp/madk.txt

have a look at that file to see if there is any errors.

Mick

madk
Posts: 13
Joined: Wed Dec 19, 2007 3:39 pm

Postby madk » Fri Jan 11, 2008 9:02 am

well i got some new errors there:

ERROR IMAP Server Da(IMAP Server Pr) 01.11.08 13:43:54
[OM 24070] Debug message for Lab use :
imapMimeUpdateCRecNums: Could not open/read container
User Name: username / mailnode/CN=username


ERROR IMAP Server Da(IMAP Server Pr) 01.11.08 13:43:54
[OM 3433] The open container reference provided is invalid.
User Name: username / mailnode/CN=username
<- checkCoreNotifications
-> imaplex_nextRequest
<- imaplex_nextRequest
-> imapFetch
-> prepareFetch
<- prepareFetch
-> imapMimeUpdateCRecNums
-> ct_FindDITEntryByRef
-> ct_DecodeDirectRef
<- ct_DecodeDirectRef
-> ct_FindDITEntry
<- ct_FindDITEntry
<- ct_FindDITEntryByRef
-> ct_ReadNextContentRec
<- /build/11.2.0/src/lib/ct/ct_octner.c:64[3,3433]

in addition to all those problems which i described yesterday the server is quite slow, probably because its running in an vmware guest, so im going to move scarlix to a non virtualized host.
but since i got the impression that my current installation is pretty messed up, i dont want to just rsync /var/opt/scalix.
Im going to make a fresh install on the new host, this way i get the newest scalix version (my current is 11.2).

i successfully used sxmboxexp and sxmboximp to move one mailbox to the new host for testing purposes, this way i got to open the broken account again.

when i look at all the different backup scripts for scalix, i realise that they either backup the whole /var/opt/scalix, or only the mailboxes themself.

So in order to move all mb's to the new host, i would have to create all user accounts manually and set a new password for them. doesnt sound that nice :(

is there a way to export / import the user accounts themselfs, including settings/passwords, so i could perform the export and import automatically for all users at once?

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Fri Jan 11, 2008 9:20 am

Unfortunately this is a all-or-nothing scenario ...

What I have done in the past is to use a script to read omshowu, save that information, then use a script on the other side to import the usernames again. sxmboxexp/imp should transfer the user settings. Will not transfer the passwords, though.

Transferring the whole /var/opt/scalix/??/s will transfer all the users, settings, passwords, etc. Permissions is critical here, though.

mikethebike
Posts: 566
Joined: Mon Nov 28, 2005 4:16 pm
Location: England

Postby mikethebike » Fri Jan 11, 2008 9:23 am

madk,

ok, i wll get shot for this:

omsearch -d userlist -t h -e s=*/ul-type=primerecip -m s/g/i/q/ul-pwd

Use that file to create the new accounts, and then use it to modify the userlist directory entries with the "ul-pwd" value. That will retain the passwords.

Be careful with the userlist directory...you have the potential to really mess things up...maybe do a "omsearch -d userlist -t h -e s=* > /tmp/madk.userlist" before messing with it :-)

You could retain autoactions by also moving across the 3d, *.500 and *.501 files from the old "g" directory to the new "g" directory. Unfortunately, the changes of those directory names being the same are remote.

Mick

Mick

madk
Posts: 13
Joined: Wed Dec 19, 2007 3:39 pm

Postby madk » Sat Jan 12, 2008 8:45 am

noone shot you mike ;)

autoactions seem to be included in the exported userfile created with sxmboxexp, so there is no need to transfer those files individually.

what im going to do is use sxmboxexp and omsearch / ommodent to transfer the important settings from the userlist.

what im not yet sure about are the groups and mail forwardings, will have to check that out next week.

but as i see it, apart from groups and forwards the above would cover ALL user data, so that way i will be able to transfer the mailboxes and all settings to the new host, wouldnt you agree? ;)

thx again for the hints / commands you posted, they have been very helpful!

Regards, Moritz


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 3 guests

cron