Although I consider myself a seasoned Seamonkey user, I regularly bump into the same problem: after I set up a new mail account, it fetches all mail from the server and happily deletes the originals. It is not much of a problem, because I delete them from time to time, but I still felt somewhat uneasy to see them deleted. Same thing happened yesterday. Recently I switched to my own mail server and, as have full control over it, I figured that this time I should be able to put my mail back. Here’s how I managed to restore all deleted mail.

Step 1. Find your local mailbox

Seamonkey stores its local mailbox somewhere like ~/.mozilla/seamonkey/8fde346h.default/Mail. In case you fetch mail from several addresses, there will be several sub-directories here (one for each source of mail). Locate the directory that corresponds to the mailserver you need, cd to it, and find the file called Inbox.

Step 2. Upload your mailbox file to your mailserver

scp Inbox username@mailserver.name:/path/to/user/home

Step 3. Transfer the messages into your mail account

This is the most important part. Once your mbox file is on the server, you need to parse it and move every message into your mail account. I did it with

formail -s /usr/lib/dovecot/dovecot-lda -d username < Inbox

Wait for the transfer to end (it may take quite some time, depending on the mailbox size), clean up (delete the Inbox file).

Downsides:

  • The dates will be broken (the date of transfer instead of the date when the original mail arrived).
  • Because of the issue above, your mail client will download all messages again.

2 Responses to “Restoring deleted mail on the server from mail-client copy”

  1. Sergio Says:

    I lost my Inbox file after a computer crashed. The file Inbox.msf I could recover. How can I recover the file inbox? I use seamonkey mail-client on windows 7.

  2. Vitalie Ciubotaru Says:

    Hello, Sergio.

    I am very sorry to hear you lost your “Inbox” file. Unfortunately, “inbox.msf” does not contain any messages, they were all in “Inbox”. If you do not have “Inbox” (just in case: it’s a file without extension, not a directory), this means that restoring your mailbox is probably impossible :(

    If you manage to recover the Inbox file, please have a look at this instruction on what to do next.

    Vitalie

Leave a Reply