How to Restore emails

Mark Foley mfoley at
Thu Nov 12 22:31:39 UTC 2015

According to a message to this list from Oli Schacher,, all I need to do is copy the deleted
emails to their original folder and dovecot will take care of it:

On Tue Jun 7 08:43:54 EEST 2011 Oli Schacher wrote:
>> OK, but if I want to restore a particular mail from backups, what're
>> the steps involved? What I mean is do I just copy and paste that mail
>> file from backups to the user account maildir folder and what program
>> should I run to synchronize it.
> exactly, just copy the mail from your backup back into the users
> maildir (usually into 'cur'). Make sure the permissions of the restored
> file are correct. No need to synchronize anything, dovecot automatically
> detects the added message. 

Unless someone out there advises me against doing this, I'm going to try it.

I've also seen `dovadm import` as a possible suggestion, though if a simple copy works I don't
see why anyone would use `dovadm import`.


-----Original Message-----
From: Mark Foley <mfoley at>
Date: Thu, 12 Nov 2015 17:13:50 -0500
To: dovecot at
Subject: How to Restore emails

I have a user who accidentially deleted a large number of emails prior to a certain date.  He
wants them back.  I do have a tarfile backup of these messages.  Is there a good way to restore
them? Can I simply restore them to the appropriate Maildir directory and dovecot will just
"figure it out"?

Thanks, --Mark

More information about the dovecot mailing list