Trying to migrate customers' email between cPanel accounts and I think I screwed something up.

josiahsprague

Registered
Feb 5, 2014
4
0
1
cPanel Access Level
Website Owner
I'm trying to migrate customers' email between cPanel accounts and I think I screwed something up.

I set up the email accounts on the new server, then I copied the /mail/ directory and all of it's subfolders from the old server to the new server.

When users log in, (using Squirrelmail) they see all of the messages they had in their inboxes, but when they try to go to their mail folders they are seeing an error like this:

ERROR: Could not complete request.
Query: SELECT "INBOX.FOLDERNAME"
Reason Given: Mailbox doesn't exist: INBOX.FOLDERNAME

The folders are listed on the side, but for some reason Squirrelmail thinks they don't exist. I want my clients to be able to access their email. What do I need to do?

After Google searching, it seems I may have forgotten to copy a directory something along the lines of /etc/domainname that may be causing the problem, but I no longer have access to the old server. Is there anything I can do?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello :)

Check to make sure the permissions/ownership values for the "mail" directory and it's subdirectories match up to what you see for another account that's working as intended. The following command will help with permission values:

Code:
/scripts/mailperm $username
Thank you.
 

josiahsprague

Registered
Feb 5, 2014
4
0
1
cPanel Access Level
Website Owner
I don't have any accounts that are working as intended at the moment. Do you know what the permissions should be? Right now they are 755.

I'm not sure how to run that command. Can you clarify?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
I'm not sure how to run that command. Can you clarify?
It appears you might not have root access to this server. If that's the case, I suggest contacting your web hosting provider for assistance so they can correct any permission issues if necessary.

Thank you.
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
Houston, TX
cPanel Access Level
Root Administrator
/usr/local/cpanel/scripts/mailperm looks at mail-related files' permissions, and attempts to fix them if necessary.

Run it with the --help argument to see the options you can pass it, and with the --verbose argument to see exactly what it does.

/scripts, in recent versions of cPanel, is a symbolic link to the /usr/local/cpanel/scripts directory, and I used the full path for completeness. /scripts was once itself a directory, but it is now a symlink to the actual directory.
 

josiahsprague

Registered
Feb 5, 2014
4
0
1
cPanel Access Level
Website Owner
This is probably something super obvious that I'm missing but it seems that neither /scripts/mailperm nor /usr/local/cpanel/scripts/mailperm exist on my server. (I was able to get shell access).

Any ideas? Thanks again!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
This is probably something super obvious that I'm missing but it seems that neither /scripts/mailperm nor /usr/local/cpanel/scripts/mailperm exist on my server. (I was able to get shell access).

Any ideas? Thanks again!
You will not have the ability to run that command without root access. I recommend consulting with your web hosting provider for assistance with this issue.

Thank you.