KnowledgeBase Glossary    Contact Us
Browse by Category KnowledgeBase .: Email Related Issues .: How can I repair my VPS's mail spool?

How can I repair my VPS's mail spool?

In some cases you can find the damaged email in a webmail client and delete just that damaged email.

If the mail client you use cannot correctly process your mail spool, you can directly edit the mail spool through the file manager if the file is 5 MB or smaller. Any mail set up as a virtual mail user ( will be found at:


Any mail set up "@(multiple domains)" will be found at:


A damaged email will look like (not including lines with '====='):

the end of a previous email message.
From: Day Month date time
Return-Path: somereturnpath
Received: from ...

You would then delete the lines so that the top of the mail spool looked like (again ignoring lines with '====='):

From: Day Month date time
Return-Path: somereturnpath
Received: from ...

If all of the above does not work, you can solve the issue in one of two ways:

  1. Log into the VPS via SSH. Find a zero byte file somewhere and cat that file over the top of the mail spool file. For instance, you could use the following command in a shell prompt:

    cat /var/spool/mail/example > /var/spool/mail/root

    This assumes that the mail spool for the user "example" is still a zero byte file at the time your execute this command.
  2. Remove the mail user (which will delete the whole mail spool), then recreate the mail user.

Note that either of these last actions will delete all mail currently residing on the server and should only be used as a last resort or if you don't mind losing the mail currently in that user's mail spool. You can also contact our support department to help you resolve this issue.

How helpful was this article to you?

Related Articles

article How do I delete mail from my address without moving it to the trash folder?
If you are out of disk space for your...

  1-4-2006    Views: 10231   
article What is a mail spool?
A mail spool is a file that stores the mail...

  11-22-2005    Views: 25005   
article How can I clear my VPS's log files?
To clear the log files for a site on a VPS...

  6-27-2005    Views: 12641   

User Comments

No comments have been posted.

.: Powered by Lore 1.5.4
Copyright 2005-2014 Advantagecom Networks, Inc. - Xen Linux Virtual Private Servers (VPS) - Paypal Accepted