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 (username@domainname.com) will be found at:
/var/spool/vmail/domainname.com/mail/username
Any mail set up "@(multiple domains)" will be found at:
/var/spool/mail/username
A damaged email will look like (not including lines with '====='):
====================
the end of a previous email message.
From: someuser@somedomain.com 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: someuser@somedomain.com 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:
- 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. - 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.