We are using qmail as our mail application on a linux server. A few weeks ago our server crashed and we had everything installed from scratch and our users started to send & receive email again. The problem is they have lost their old emails. We have a back up of the whole qmail directory. But I don't know how to restore the old emails without losing the new ones. It's worth mentioning that I don't have any problem with restoring old sent mails. When I copy email files into .sent-mail/cur directory, I have them restored in sent box of users, but restoring files in /cur directory doesn't work for inbox emails and I can't get them restored.

  • Do you have backups of the users' Maildirs? – Timo Geusch Mar 14 '10 at 10:53
  • Yes I do have backup of Maildirs – Meysam Mar 23 '10 at 10:35

It sounds like you're using the maildir storage format (one folder on the server for each folder, and within three directories "cur", "new" and "tmp", each containing one file for each email).

Manipulating email within Maildirs is just a matter of copying the files around. You should be able to restore all your old email by copying all the old files to the new directories.

However, make sure your users restart their email clients after doing this, because mail clients and server tend to get confused if the contents change on-the-fly.

  • Could you please tell me what you mean by restarting mail clients? – Meysam Mar 23 '10 at 10:38
  • I just mean the users email programs. If you mess with email on the server, make sure they restart they email programs (Outlook, Thunderbird or whatever). – Jonathan Clarke Mar 23 '10 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.