Current time: 11-06-2024, 11:35 AM Hello There, Guest! (LoginRegister)


Post Reply 
Problem with ispCP folders
Author Message
NIIcK Offline
Junior Member
*

Posts: 43
Joined: Jan 2010
Reputation: 0
Post: #1
Problem with ispCP folders
Hello,

I had a hard drive mounted on /home that crashed. Upon installing ispCP I've instructed it to create all mail boxes in the /home/hosting/mail/virtual/ folder but since this hard drive crashed I had to mount /home into a new hard drive.

My question is: is there a script or something I can run so ispCP would create all the domain and users folders into the /home/hosting/mail/virtual/ folder as well as setting up all permissions without destroying my current configuration?

Thank you,

Nick
(This post was last modified: 08-17-2010 03:48 AM by NIIcK.)
08-17-2010 03:47 AM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: Problem with ispCP folders
If I remember correctly, Maildir folders are automatically created by the delivery agent if they don't exist. Hence, you just have to create the "/home/hosting/mail/virtual" folder, "chown vmail:mail" it and wait for messages to come in...

It is also possible that the delivery agent refuses to create the parent (domain) folder though. If this is the case, you can use a quick script to create all the folders. For example, you could use the "domaint.tld.db" files created for the dns zones as a reference:
Code:
# cd /var/cache/bind
# for f in *.db; do mkdir /home/hosting/mail/virtual/${f%.db}; chown vmail:mail /home/hosting/mail/virtual/${f%.db}; done

Finally, as an alternative, you can also regenerate all the configurations using the ispcp-update (warning: this will regenerate all the panel-controlled configurations!):
Code:
# cp /etc/ispcp.conf /etc/ispcp.conf.old
# cd /var/www/ispcp/engine/setup
# perl ispcp-update
# rm /etc/ispcp.conf.old
(This post was last modified: 08-17-2010 05:22 PM by kilburn.)
08-17-2010 05:17 PM
Visit this user's website Find all posts by this user Quote this message in a reply
NIIcK Offline
Junior Member
*

Posts: 43
Joined: Jan 2010
Reputation: 0
Post: #3
RE: Problem with ispCP folders
(08-17-2010 05:17 PM)kilburn Wrote:  If I remember correctly, Maildir folders are automatically created by the delivery agent if they don't exist. Hence, you just have to create the "/home/hosting/mail/virtual" folder, "chown vmail:mail" it and wait for messages to come in...

It is also possible that the delivery agent refuses to create the parent (domain) folder though. If this is the case, you can use a quick script to create all the folders. For example, you could use the "domaint.tld.db" files created for the dns zones as a reference:
Code:
# cd /var/cache/bind
# for f in *.db; do mkdir /home/hosting/mail/virtual/${f%.db}; chown vmail:mail /home/hosting/mail/virtual/${f%.db}; done

Finally, as an alternative, you can also regenerate all the configurations using the ispcp-update (warning: this will regenerate all the panel-controlled configurations!):
Code:
# cp /etc/ispcp.conf /etc/ispcp.conf.old
# cd /var/www/ispcp/engine/setup
# perl ispcp-update
# rm /etc/ispcp.conf.old

Thanks a lot mate! It worked with recreating the mail storage folder and set the right permissions for it. You're the man! Big Grin

Nick
08-17-2010 07:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)