Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 22nd November 2011, 17:49
SwOsHiE SwOsHiE is offline
HowtoForge Supporter
 
Join Date: Jun 2011
Location: Stockholm, Sweden
Posts: 82
Thanks: 8
Thanked 8 Times in 7 Posts
Send a message via Skype™ to SwOsHiE
Default Mailserver error after /var/vmail/ rsync between 2 servers

Hello!

I've succesfully installed a rsync setup for wwwroot replication using this guide:

http://www.howtoforge.com/mirroring_with_rsync

But when it came to doing this for /var/vmail/ the script at [6] did something that messed up the mailserver, I cannot login and the server is not responding anymore . I forgot to modify the parts in the script, I only modified the path and server information.

What could be wrong? What is it in the /var/vmail/ folder that is sensetive and messes up the mailserver?

I tried to uninstall dovecot and then install it again and did a ISPconfig3 Update to reconfigure all services but nothing else and then deleted all the mail accounts (I have about 5 right now) and then added them again, but with no resaults!?

Best regards,
Mattias
Reply With Quote
Sponsored Links
  #2  
Old 22nd November 2011, 18:34
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,704
Thanks: 819
Thanked 5,321 Times in 4,174 Posts
Default

Which error messages do you get in the mail log file?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 22nd November 2011, 18:44
SwOsHiE SwOsHiE is offline
HowtoForge Supporter
 
Join Date: Jun 2011
Location: Stockholm, Sweden
Posts: 82
Thanks: 8
Thanked 8 Times in 7 Posts
Send a message via Skype™ to SwOsHiE
Default

Nov 22 18:36:06 btsv02 dovecot: imap-login: Login: user=<user@domain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Nov 22 18:36:06 btsv02 dovecot: dovecot: Fatal: chdir(/var/vmail/domain.com/user/) failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +x perm: /var/vmail/domain.com)
Nov 22 18:36:06 btsv02 dovecot: dovecot: child 25352 (imap) returned error 89 (Fatal failure)

Looks like the folders got some other permission?!
Reply With Quote
  #4  
Old 22nd November 2011, 18:48
nbhadauria nbhadauria is offline
Member
 
Join Date: Aug 2010
Location: New Delhi, India
Posts: 79
Thanks: 1
Thanked 13 Times in 13 Posts
Send a message via Skype™ to nbhadauria
Default

check permission of /var/vmail/domain.com/user/ it should have vmail.vmail..

can you post the output of ..

ls -ld /var/vmail/domain.com/user/ /var/vmail/domain.com/ /var/vmail/

Last edited by nbhadauria; 22nd November 2011 at 19:01.
Reply With Quote
  #5  
Old 22nd November 2011, 19:30
SwOsHiE SwOsHiE is offline
HowtoForge Supporter
 
Join Date: Jun 2011
Location: Stockholm, Sweden
Posts: 82
Thanks: 8
Thanked 8 Times in 7 Posts
Send a message via Skype™ to SwOsHiE
Default

drwx------ 3 vmail vmail 4096 21 nov 22.13 /var/vmail/domain.com/user/


drwx------ 4 root root 4096 21 nov 22.13 /var/vmail/domain/


drwxr-xr-x 6 5016 vmail 4096 21 nov 22.22 /var/vmail/
Reply With Quote
  #6  
Old 22nd November 2011, 19:39
nbhadauria nbhadauria is offline
Member
 
Join Date: Aug 2010
Location: New Delhi, India
Posts: 79
Thanks: 1
Thanked 13 Times in 13 Posts
Send a message via Skype™ to nbhadauria
Default

Change the following permission ..

drwx------ 4 root root 4096 21 nov 22.13 /var/vmail/domain/

chown vmail.vmail -R /var/vmail/domain.com/
Reply With Quote
  #7  
Old 22nd November 2011, 19:53
SwOsHiE SwOsHiE is offline
HowtoForge Supporter
 
Join Date: Jun 2011
Location: Stockholm, Sweden
Posts: 82
Thanks: 8
Thanked 8 Times in 7 Posts
Send a message via Skype™ to SwOsHiE
Default

This solves the problem indeed, BUT new created mail accounts get the same problem The first mailaccount in a domain works because it does not create a domain folder under /var/vmail, but when a secound mail account is created, the folder in /var/vmail is created and get's the root permission.
Reply With Quote
  #8  
Old 22nd November 2011, 20:00
SwOsHiE SwOsHiE is offline
HowtoForge Supporter
 
Join Date: Jun 2011
Location: Stockholm, Sweden
Posts: 82
Thanks: 8
Thanked 8 Times in 7 Posts
Send a message via Skype™ to SwOsHiE
Default

A thought that came to my head said that you should be able to give /var/vmail/ full permission to vmail.vmail and ALSO add this permission to all sub-directories, but I do not know how to make such a command?! Is this possible?
Reply With Quote
  #9  
Old 22nd November 2011, 20:06
nbhadauria nbhadauria is offline
Member
 
Join Date: Aug 2010
Location: New Delhi, India
Posts: 79
Thanks: 1
Thanked 13 Times in 13 Posts
Send a message via Skype™ to nbhadauria
Default

Quote:
Originally Posted by SwOsHiE View Post
A thought that came to my head said that you should be able to give /var/vmail/ full permission to vmail.vmail and ALSO add this permission to all sub-directories, but I do not know how to make such a command?! Is this possible?
it already have full permission don't worry about that..

can you explain a little more about your problem ..

i didn't get that you said that you rsync that directory from some other server. now you are trying to add new account..

are you using to server two mail servers ??
Reply With Quote
  #10  
Old 22nd November 2011, 20:14
SwOsHiE SwOsHiE is offline
HowtoForge Supporter
 
Join Date: Jun 2011
Location: Stockholm, Sweden
Posts: 82
Thanks: 8
Thanked 8 Times in 7 Posts
Send a message via Skype™ to SwOsHiE
 
Default

I am sorry for being so missleading..

I am using 2 servers (Mirror setup with ISPconfig3), The first server is used always and the mirror server is used if the first server goes down.

To always have the same information at both servers, I've been using MySQL master-master replication, /var/www/ rsync and was on my way to make /var/vmail rsync. The last step updated the files on the mirror server but also made some changes on the first server witch I did not expect, my bad.

After this, the permission thing started and newley created accounts get this problem.

I hope I made some things clear to you?

Best regards,
Mattias
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disappearing emails ispconfig 2 / postfix DrJohn General 2 14th May 2010 17:21
mirroring with rsync (mulitple servers) edpatterson HOWTO-Related Questions 14 15th April 2009 18:16
Virtual users... Ubuntu 8.04 spaceuser HOWTO-Related Questions 12 19th June 2008 08:04
Unable send receive emails vassilis3 Installation/Configuration 15 19th May 2007 14:34
Systemimager (rsync) doesn't copy all comedit HOWTO-Related Questions 11 19th January 2007 17:17


All times are GMT +2. The time now is 00:29.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.