LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Mail Server Upgrade (https://www.linuxquestions.org/questions/linux-server-73/mail-server-upgrade-691229/)

stefanolima 12-17-2008 09:04 AM

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,

robertjinx 12-17-2008 09:22 AM

Add this to you dovecot configuration file:

mail_privileged_group = mail

restart dovecot and then try again.

stefanolima 12-17-2008 09:39 AM

Quote:

Originally Posted by robertjinx (Post 3378670)
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?

stefanolima 12-18-2008 12:41 AM

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

billymayday 12-18-2008 12:48 AM

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.

stefanolima 12-18-2008 01:35 AM

Quote:

Originally Posted by stefanolima (Post 3379554)
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


All times are GMT -5. The time now is 01:07 PM.