Corrupted (?) mailstore

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

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

Corrupted (?) mailstore

Postby Valerion » Wed Apr 19, 2006 9:45 am

We've got an EE customer with what looks like a serious mailstore corruption.

Firstly, the mailstore gave several [SYS 0] errors on mails in the SMERR queue, blocking the queue completely. I went in with omqdump and repaired those, but they came back the next day. So I checked the mailstore itself and found that lots of files had incorrect ownership and permissions. I ran a omcheck to repair all these, which worked fine.

Then I ran a omscan report, and found a LOT of orphans and missing children. I decided to (for now) not try and actually fix those errors.

Via IMAP they are also getting a lot of "SELECT failed" errors in some mailboxes.

1) Has anyone seen Scalix itself change permissions before? This is the first time I am seeing this in all my installs.

2) Does anyone have any advice for me on how to try and recover this mailstore? I am considering a mass omcpoutu and a re-install, user re-create and a mass omcpinu, but I've got a feeling that would just restore the corrupted mailboxes, keeping them in that state.

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Wed Apr 19, 2006 10:52 am

Permissions errors usually happen if someone has copied the message store without the -p option or the message store has been copied with a different /etc/passwd in place, i.e. the scalix uid and gid are different.

Do you know if this is the case ? Can you check that /etc/passwd hasn't been changed ? What uid/gid and permissions did the files have ?

Cheers

Dave

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

Postby Valerion » Thu Apr 20, 2006 3:25 am

On some affected files world-read permissions was added, while others files in the mailstore (especially the ~/user directory) was owned by user & group root. It seems to only affect some mailboxes, though.

[root@mail ~]# grep scalix /etc/passwd
scalix:x:102:103:Scalix User:/var/opt/scalix:/bin/true
[root@mail ~]# grep scalix /etc/group
scalix:x:103:
clamav:x:104:scalix

I still suspect the client themselves made a mistake here without realizing it, but I thought I'd check anyway.

Any ideas on recovering the store? Today I am going to copy the whole mailstore to a different machine and see if I can recover it there with omscan and maybe omcpoutu/omcpinu.

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Thu Apr 20, 2006 5:16 am

Hi,

please use the omcheck script to generate a file containing the right permissions.

Cheers,

Sascha.



NAME
omcheck - check Scalix file permissions and ownership

SYNOPSIS
omcheck { -i [-d] | -s [-d] }

DESCRIPTION
omcheck is a script that checks Scalix file permissions and ownership for each installable Scalix component.

Run with the -s option, omcheck creates a shell script to correct reported problems.

If a file is reported as missing, you must reinstall the relevant component from the installation media.

You must have system administration (root) capability to run this command.

Options
-i Checks, for each installed component of Scalix, that the relevant program and configuration files exist and that
their permissions and ownership are correct. The result of the check is reported to standard output.

-s Generates a shell script, on standard output, to correct file permission and ownership problems.

-d Used with the -i or -s options, checks the file permissions and ownership of user data files; that is, all directo‐
ries and files under:

/var/opt/scalix/data
/var/opt/scalix/acl
/var/opt/scalix/dir
/var/opt/scalix/user*/g??????
/var/opt/scalix/user*/u??????

EXAMPLES
To check the relevant Scalix program and configuration files exist and that their permissions and ownership are correct,
type:

omcheck -i | more

To check the relevant Scalix program and configuration files exist and that their permissions and ownership are correct,
along with the permissions and ownership on user data files, type:

omcheck -i -d | more

To correct problems with file permissions and ownership on user data files, type:

omcheck -s -d > /tmp/check_file

and then type:

sh /tmp/check_file

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

Postby Valerion » Fri Apr 21, 2006 3:19 am

I did use omcheck to repair the permissions before I started this thread. Interestingly enough, the next day I was told that certain mailboxes is suddenly giving errors ...

I am also considering doing a 10.0.0 -> 10.0.1 upgrade for them. ompatchom may also fix some small errors.


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 17 guests