LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-17-2008, 09:04 AM   #1
stefanolima
Member
 
Registered: Jul 2008
Location: Dar-es-Salaam
Distribution: Fedora,CentOS,Ubuntu
Posts: 60

Rep: Reputation: 15
Mail Server Upgrade


Hi!

I'm upgrading my mail server from oldmachine to new one with updated OS and configurations files, i.e. fedora, postfix, dovecot, squirrelmail, everything went ok till when I had to transfer user from old to new machine, i.e. /home directory and /var/spool/mail.

After I've populated this /home directory with new users dovecott can't open mailboxes, can't login to webmail using those transsfered acccount, emails I send to those new accounts bounces (permision denied to update /var/spool/mail). etc, error messages from maillog are of this kind:

Dec 17 17:16:50 kilimail dovecot: imap-login: Login: user=<stefano>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Dec 17 17:16:50 kilimail dovecot: IMAP(stefano): open(/home/stefano/mail/inbox, O_CREAT) failed: Permission denied
Dec 17 17:16:50 kilimail dovecot: IMAP(stefano): mkdir_parents(/home/stefano/mail/.imap/INBOX) failed: Permission denied
Dec 17 17:16:50 kilimail dovecot: IMAP(stefano): stat() failed with mbox file /home/stefano/mail/inbox: Permission denied
Dec 17 17:16:50 kilimail dovecot: IMAP(stefano): Connection closed

Dec 17 16:50:10 kilimail dovecot: IMAP(stefano): mbox: Can't create root mail directory /home/stefano/mail: Permission denied
Dec 17 16:50:10 kilimail dovecot: IMAP(stefano): mail_location not set and autodetection failed with home=/home/stefano
Dec 17 16:50:10 kilimail dovecot: child 3936 (imap) returned error 89
Dec 17 16:55:13 kilimail dovecot: imap-login: Login: user=<stefano>, method=P

Dec 17 16:55:13 kilimail dovecot: imap-login: Login: user=<stefano>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Dec 17 16:55:14 kilimail dovecot: IMAP(stefano): open(/home/stefano/mail/inbox, O_CREAT) failed: Permission denied
Dec 17 16:55:14 kilimail dovecot: IMAP(stefano): mkdir_parents(/home/stefano/mail/.imap/INBOX) failed: Permission denied
Dec 17 16:55:14 kilimail dovecot: IMAP(stefano): stat() failed with mbox file /home/stefano/mail/inbox: Permission denied
Dec 17 16:55:14 kilimail dovecot: IMAP(stefano): Disconnected: Logged out
Dec 17 17:00:15 kilimail dovecot: imap-login: Login: user=<stefano>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Dec 17 17:00:15 kilimail dovecot: IMAP(stefano): open(/home/stefano/mail/inbox, O_CREAT) failed: Permission denied
Dec 17 17:00:15 kilimail dovecot: IMAP(stefano): mkdir_parents(/home/stefano/mail/.imap/INBOX) failed: Permission denied




----------------

I understand the logic that I get access denied because those folders have been moved from different location, but even when I tried to redefine owners and groups but still I can't acess them via email system,

Any help is appreciated

Cheers,
 
Old 12-17-2008, 09:22 AM   #2
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 747

Rep: Reputation: 73
Add this to you dovecot configuration file:

mail_privileged_group = mail

restart dovecot and then try again.
 
Old 12-17-2008, 09:39 AM   #3
stefanolima
Member
 
Registered: Jul 2008
Location: Dar-es-Salaam
Distribution: Fedora,CentOS,Ubuntu
Posts: 60

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by robertjinx View Post
Add this to you dovecot configuration file:

mail_privileged_group = mail

restart dovecot and then try again.
It's already there, but still not working. If anyone can tell me when I move a folder from one machine to another what shall be done for it to work as it was working in the old machine apart from putting correct user group and access rights? Another thing is that I'm not sure if in the old machine it was using maildir/, mailbox, mbox or what as the configuration files for postfix are put on default parameters as far as mailboxes are concerned

i.e. the lines with maildir/, mailbox are commented ##

however one error message I got it mentions mbox, so does it means that maybe the old one was using mbox and my new machine doesn't use mbox? or vice versa?
 
Old 12-18-2008, 12:41 AM   #4
stefanolima
Member
 
Registered: Jul 2008
Location: Dar-es-Salaam
Distribution: Fedora,CentOS,Ubuntu
Posts: 60

Original Poster
Rep: Reputation: 15
OK, found the problem, when I was redefining ownership/access rights on the main folder, the subfolders remained with old access rights/ownership. How can I change ownership and access rights of a folder so that the subfolders also inherit those access rights? Right now I'm doing it manually

Cheers
 
Old 12-18-2008, 12:48 AM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
something like

chown -R user:group /home/user/*

If you need to change access rights (do you mean permissions?), I'd use find and treat files and directories differently.
 
Old 12-18-2008, 01:35 AM   #6
stefanolima
Member
 
Registered: Jul 2008
Location: Dar-es-Salaam
Distribution: Fedora,CentOS,Ubuntu
Posts: 60

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by stefanolima View Post
OK, found the problem, when I was redefining ownership/access rights on the main folder, the subfolders remained with old access rights/ownership. How can I change ownership and access rights of a folder so that the subfolders also inherit those access rights? Right now I'm doing it manually

Cheers
Ok, finally found the solution, man chown gave me the answers 'chown -hR'

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
After yum upgrade, Postfix/Dovcott mail server is broken timgerr Linux - Server 13 08-24-2008 09:54 PM
Upgrade from 7.10 to 8.04 stops connection to mail server and selected internet sites adcockp Ubuntu 10 06-07-2008 09:47 PM
How to connect linux mail server with the exchange mail server nanuseenu Linux - Newbie 4 03-04-2008 03:37 AM
upgrade clamav on mitel sme mail server Warmduvet Linux - Newbie 0 05-08-2005 10:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration