Broken Mailbox / omcontain / new accs only work with webmail

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

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

Broken Mailbox / omcontain / new accs only work with webmail

Postby madk » Wed Jan 09, 2008 4:05 pm

Hello,

im kinda stuck with the following problem:

I'm managing a scalix Server with ~~30 Mailboxes, now one user only sees ~30 from her ~200 Mails in Inbox, and only receives new Mails to a certain Mailadress(an alias actually).
All other Mails dont show up using Apple Mail.
Exploring the Problem, i tried to open that user Mailbox with Thunderbird on Windows.
Same Problem, only the same ~30 Mails show up, BUT i get an error message saying "some of the requested messages no longer exist".

When searching the forums i realised that the problem is very likely a single email which somehow breaks the Inbox folder.

I tried several ways which helped other admins on this problem (or at least with the same error message :=) ) with no success. (deleting imap-cache, omscan, omtidyallu)

the only other way of fixing the problem is probably to delete the one broken email in that account.
omcontain seems to be the utility of choice.

Ill manage to open the users account with omcontain, but now im stuck on how to list e.g. the subject of all mails and/or the senders address so i can identify all spam(which i hope will include the error causing mail) and delete it.

So if you could point me to the omcontain options i need in order to get a full list of a folder and the option to delete a certain message it would be greatly helpful.

Thanks in advance, Moritz
Last edited by madk on Thu Jan 10, 2008 9:17 am, edited 1 time in total.

mikevl
Scalix Star
Scalix Star
Posts: 596
Joined: Mon Feb 02, 2004 8:32 pm
Location: New Zealand

Postby mikevl » Thu Jan 10, 2008 4:25 am

Hi

First you need to run

omscan -Aavfx

You can get it to run for just one mailbox if you like try man omscan

this MAY fix the issue

Make sure the user is not logged in

omstat -u rci |grep username

if processes exist the

kill -9 pid pid etc

Mike

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

Postby madk » Thu Jan 10, 2008 4:46 am

already tried that as written above. thx anyway...
right know i just would like to know how to get a complete list of all mails in a certain mailbox (eg. listing with subjects?) and how to delete/move a certain mail...

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

Postby mikethebike » Thu Jan 10, 2008 5:02 am

Hi,

as a first shot, try using omtidy to list the mails

omtidyu -B -u <name> -i 0 -R

You could even try deleting the mail you think is causing the issue using omtidyu...see the man pages for the switch to delete using message subject or sender.

Also, try using omcpoutu, that may direct you to the corrupt message (you may get a filename and folder where the message resides). I would suggest only using omcpoutu on the Inbox to save time, and do not bother sending to a file (omcpoutu -Si -n <name> -f /dev/null).

You can then get the approx date/time of that file, which will help identify the message when you use omcontain.
If you are having problems with omcontain, use "??" while you are in there, and you will get more verbose help on all the options.

I would guess that when you find the corrupt message, when you try reading it in omcontain it will throw up an error. You may need to zap it (D) rather than delete (d).

Mick

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

Postby madk » Thu Jan 10, 2008 9:45 am

thanks for your replys, i did the following:

using thunderbird i was able to create a new imap folder within inbox, and i moved all visible (~30 of ~200) messages one by one into it. This way i identified 2 messages which could not be moved, and searched for them with omtidyu and omcontain.
They both did not show these 2 messages, so i now have identified 2 probably corrupt messages, but cant remove them.
Then i removed one message which was recieved right aber the 2 corrupt ones using omcontain "D", successfully, the message is gone now, but i cant login to the account anymore, not via imap nor webmail. Webmail tells me that "the user couldnt be found or the entered password is incorrect".

And I've got another Problem, when creating new user accounts i can use them with webmail but not with imap. This problem first occured this morning, before i started playing with omcontain's delete options...

in some way the account in question is still working, i was able to add an redirect to another mail address with sxaa, and its working.

I summarize:
- One Account is messed up, no imap, no webmail... redirect created with sxaa is working though.
- New Accounts dont work at all with imap, webmail is fine.

today and the day before the fatal log grew pretty big, but after cleaning up ALL imap-cache dirs no new entrys occur.

edit: i did create a backup of the "broken" mailbox with omcpoutu -n <user> -f backup, which is about 600m big, though the /s/user/userid/ folder only holds 1.6m. where is the rest of the data saved?

ideas anyone? :=)

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

Postby mikethebike » Thu Jan 10, 2008 10:00 am

Hi,

can you still see the mailbox (omshowu)?
Try resetting the passowrd in case that is incorrect.

Can existing users log out and back in again using IMAP? What do the services/daemons say (omstat -s and omstat -a). Maybe the IMAP daemon has died.

Mick

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

Postby madk » Thu Jan 10, 2008 10:10 am

the mailbox is still there (omshowu), i had already changed the pw but changed it again w/o success, all other users login/logout w/o problems, all services are "Enabled/Started" apart from "Item Structure Server Stopped".

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

Postby mikethebike » Thu Jan 10, 2008 10:16 am

If you do an "omshowu -n "name" -f", make a note of the "user folder".
cd to that directory, and check the files are still there (you should see 000001 -> 000005 among others. You may have a folder missing or so corrupted the client cannot log in.

If you have a good backup of the user, I would suggest deleting the account and recreating (maybe safer to rename the current account and create the new one), then copy in the backup uo mailbox.

Mick

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

Postby madk » Thu Jan 10, 2008 10:39 am

-rw-rw---- 1 scalix scalix 1198297 Jan 10 15:32 0000001
-rw-rw---- 1 scalix scalix 22361 Jan 10 09:57 0000002
-rw-rw---- 1 scalix scalix 51456 Jan 10 12:25 0000003
-rw-rw---- 1 scalix scalix 15360 Jan 10 11:25 0000004
-rw-rw---- 1 scalix scalix 3072 Feb 5 2007 0000005
-rw-rw---- 1 scalix scalix 193 Jan 10 13:15 000002g
-rw-rw---- 1 scalix scalix 0 Feb 5 2007 000002g.lck
-rw-rw---- 1 scalix scalix 128 Jan 10 13:15 000002m
-rw-rw---- 1 scalix scalix 246 Jan 10 15:05 000002n
-rw-rw---- 1 scalix scalix 0 Feb 5 2007 000002n.lck
-rw-rw---- 1 scalix scalix 1323 Jan 10 15:23 000002o
-rw-rw---- 1 scalix scalix 145179 Jan 10 15:32 000002q
-rw-rw---- 1 root scalix 568 Jan 10 13:49 000003d
-rw-rw---- 1 scalix scalix 347 Dec 12 14:22 000003d.bak
-rw-rw---- 1 scalix scalix 603 Dec 12 14:22 000003g.501
-rw-rw---- 1 scalix scalix 227 Jul 6 2007 000003g.508
-rw-rw---- 1 scalix scalix 3550 Jul 13 19:57 000003t.508
-rw-rw---- 1 scalix scalix 0 Jul 6 2007 000003t.tmp
-rw-rw---- 1 scalix scalix 53 Jan 10 13:44 000003v.1
-rw-rw---- 1 scalix scalix 0 Feb 13 2007 000003v.1.lck
-rw-rw---- 1 scalix scalix 0 Feb 13 2007 00000fk
-rw-rw---- 1 scalix scalix 8832 Jan 10 15:32 00000v8
drwxrwxr-x 2 scalix scalix 4096 Jan 10 11:31 00000v8.ofs
-rw-rw---- 1 scalix scalix 92 Jul 6 2007 000020h
drwxrwx--- 2 55014 scalix 4096 Jan 10 13:11 imap-cache


i think my last backup is one week old, and is just an rsync of the whole /var/opt/scalix directory, and since it seems to me that not all user data resides in the user folder /s/user/userid, i dont know what to cp...

creating a new account isnt a choice either right know, because as i wrote in my last post, new accounts dont work (besides webmail).

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

Postby mikethebike » Thu Jan 10, 2008 10:52 am

Hi,

sorry, when I said a backup, I meant the files created by omcpoutu.
If you run the omcpoutu for each folder area, you should be able to get most of the mailbox copied out. When it stalls at the point where the mailbox is corrupted, you should also have a record in the fatal log detailing the filename omcpoutu had a problem with. You should be able to identify the assiciated filenames using omcontain (normally, the serialised files will be sequential in name, but may be in different data directories.

I am confused as to why you cannot log in with that user.
Is the mail account unlocked (omshowu -n "name" |grep Account)

Mick

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

Postby madk » Thu Jan 10, 2008 11:03 am

well i only have the omcpoutu backup from today, before i started messing around with omcontain...
this one i probably could import using omcpinu, but i wont try that before i got newly created users being able to login again, and yes the user is very much activated.

right now im searching for logfiles i might have missed before and which could point me to the problem, but apart from the system logs ,/var/opt/scalix/NN/s/logs/*, tomcat & postgres i dont find any.


edit: when exporting the users mailbox with omcpoutu, there did not occur any errors...

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

Postby mikethebike » Thu Jan 10, 2008 11:15 am

I wonder if its a problem with the contents of imap-cache?

Maybe make a copy of the contents, delete the originals, then retsart the IMAP service (probably better to do the restart overnight when everyone is logged off).

The other thing you could do is see if the omcpoutu you have is good.

Create a new mailnode (omaddmn -m restoremn), then create another account with the same username but in that new mailnode (omaddu -n username/restoremn...etc).
Then copy in the mailbox (omcpinu -f filename -m restoremn.
Rename that new mailbox (the user may have problems logging in if there are duplicate accounts, even if they are different mailnodes....unless you specify the mailnode in the login name).

Mick

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

Postby madk » Thu Jan 10, 2008 11:31 am

u mean the content of the imap-cache dir which resides in every users dir?
already deleted the contents off it several times, and i made sure that nothing was accessing that files using lsof...

about the new mailnode: how would scalix decide to which it has to deliver mail to?
i mean if i have 2 mailnodes on the same server/ip, both with mail accounts using the same domain AND both with one mail account which is the same on both servers...

it seems to me that addind a new mailnode might me a bit dangerous on a live system ;)

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

Postby mikethebike » Thu Jan 10, 2008 11:40 am

Hi,

I think deleting the imap-cache for the problem user may resolve it the login/data loss issue for that user (as webmail displays the messages...possibly the IMAP cache is causing issues).

Creating a new amilnode is not a problem. I would recommend creating the new account without a directory entry to avoid confusion. I suggested it just to see if the backup you made of the user's data was good. You could delete the user and new amilnode afterwards.

Mick

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

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

well as i already said, i deleted the imap-cache several times and tried to login afterwards.

I'm now going to look into the creation of a new mailnode to check the backup.
But still does NOT solve the problem of NEW users being ubable to login via imap.

and my fatal logfile is exploding again with the following error:

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

i moved the file so i could count:
cat fatal_old | grep "OM 3433" | wc -l
44512
first log entry is from 16:51:33, last from 16:55:02, so the error occured 44k times within 4:30 Minutes.... quite a lot ;)

I am very sure that as soon as i have deleted the imap-cache content from the user (making sure the user is logged out and nothing accesses the users dir) the errors will stop for some time, and in some hours start again.
its always only one or two users, not the broken one, and the accounts still work while errors beeing written to the fatal log.


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 4 guests

cron