[Solved] Error while accessing sent and draft folders – webmail – Squirrel mail

Recently I came across this error in one of our client’s cPanel server. That is, when he access Drafts or Sent folders in Webmail (squirrel mail), I was getting the following error. Accessing INBOX seems to be okay. Only problem was with Drafts and Sent folders.

I tried creating a new email account and it seems to be okay. That is, the newly created email account has no problems in accessing Sent or Draft folders in squirrel mail. Don’t worry. Here is the solution. If anyone come across the same error can follow the steps below to correct this problem.

ERROR: Could not complete request
Query: SELECT{12} INBOX.Drafts
Reason Given: [SERVERBUG]Internal error occurred. Refer to server log for more information.



Log into server as root. Check the .Sent folder inside the mail folder.

# cd /home/user/mail/domain.com/email_account/.Sent

Check whether tmp folder is present in this folder. If not, then create it.

#root@server [/home/user/mail/domain.com/email_account/.Sent]# ls -ld tmp/
drwxr-x--x 2 user user 4096 Jan 31 11:30 tmp//

If tmp was missing then you create the tmp directory using mkdir command.

#root@server [/home/user/mail/domain.com/email_account/.Sent]#mkdir tmp

Make sure to assign the ownership as user for this tmp folder. You’ll also get the same error, if the ownership of the tmp folder is wrong.

Same procedures can be done in .Drafts folder if you’re facing this error in Drafts folder.

That’s it!!!

Related topics

1, Possible root compromise detected: Failed to create directory /dev/null – cPanel
2, Error while adding an Addon domain in cPanel
3, Error – phpize command not found
4, 20+ common PHP compilation errors and fix – Unix

Post navigation

Heba Habeeb

Working as a Linux Server Admin, Infopark, Cochin, Kerala.

3 thoughts on “[Solved] Error while accessing sent and draft folders – webmail – Squirrel mail

Leave a Reply

Your email address will not be published. Required fields are marked *