Error while accessing sent/draft folders – webmail – Squirrel mail

Recently we came across the error in one of our client’s cPanel server. That is appearing, when he access Drafts or Sent folders in Webmail (squirrel mail), Most of the user’s are using either Squirrel mail or Round cube for accessing emails through webmail. If the temporary file for the email account is corrupted you will get an error like:


ERROR: Could not complete request

Query: SELECT{12} INBOX.Drafts

Reason Given: [SERVERBUG]Internal error occurred. Refer to server log for more information.

If anyone come across the same error, Don’t worry here is the solution:

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


You need to check whether tmp folder is present in the location or not:


cd /home/username/mail/domainname/email_account/.Sent
ls -al tmp

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

mkdir tmp

Now make sure to set the ownership for this tmp folder ,Otherwise you keep getting the same error.

chown username.username tmp

Same procedures can be done for other folders , if you’re facing this error in other folders.