Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Sean on October 22, 2003, 06:52:36 PM

Title: getting mail to work after a tape restore
Post by: Sean on October 22, 2003, 06:52:36 PM
It's now too close to midnight... I need some serious help here.

SME 5.5 box died (both hdds), rebuilt with new HDDs and did the restore from tape - hooray, the files are there. But mail doesn't work...

I think the problem is the permissions didn't get reinstated for the user's directories. They are all like :
drwx------    2 root     admin        4096 Oct 11 21:46 home
drwx------    5 root     admin        4096 Oct 11 21:46 Maildir

which is way wrong. The files in their maildirs seem to be correctly moded, but getting into webmail and attempting to send a mail to one's self produces the follwoing in /var/log/messages:

Oct 22 23:28:20 gateway HORDE[1849]: [imp] Login success for skelly [192.168.0.33] to {localhost:143} [on line 51 of "/home/httpd/html/horde/imp/redirect.php"]
Oct 22 23:28:21 gateway httpd: PHP Warning:  SELECT failed: Can't open mailbox INBOX: no such mailbox (errflg=2) in Unknown on line 0
Oct 22 23:28:42 gateway imp[1849]: PHP Warning:  SELECT failed: Can't open mailbox INBOX: no such mailbox (errflg=2) in Unknown on line 0
Oct 22 23:28:51 gateway httpd: PHP Warning:  SELECT failed: Can't open mailbox INBOX: no such mailbox (errflg=2) in Unknown on line 0
Oct 22 23:28:51 gateway httpd: PHP Warning:  CREATE failed: Can't create mailbox node /home/e-smith/files/users/skelly/Mail/: Permission denied (errflg=2) in Unknown on line 0
Oct 22 23:28:51 gateway httpd: PHP Warning:  APPEND failed: Can't append to mailbox Mail/sent-mail: no such mailbox (errflg=2) in Unknown on line 0

There are stacks of users on this box. Would re-restoring fix it? Or do I need to do something laborious?

Please help. This is driving me nuts...

Thanks in advance,

Sean
Title: Re: getting mail to work after a tape restore
Post by: Byte on October 22, 2003, 08:22:31 PM
hey buddie I once had this problem and it was due to incorrect permissons on the Maildir folder the folder *had* to have permissons of 755 so try

chmod -R 755 Maildir/

also make sure that the user for that mailbox is like sean.sean

Just a suggestion
Title: Re: getting mail to work after a tape restore
Post by: Byte on October 22, 2003, 08:26:08 PM
just incase you wasnt sure of how to change user on folders just type

chown -R sean.sean Maildir/

R bit is to change everything below that directory

That should solve your problem as i see in you post its root.admin and permissons are 700

Again Hope this helps
Title: Re: getting mail to work after a tape restore
Post by: Sean on October 23, 2003, 03:01:24 AM
Ahh, thanks for that...

Wrote a bash script to chmod and chown the dirs and it seems to work now.

Now to wait for the screaming.

Thnx again.

Sean