On Mon, 2012-04-30 at 10:59 +0200, [email protected] wrote: > Good day! > > is there an easy way to restore e.g. deleted mails and/or mail directories? > let me specify: I'm running dovecot 1.2.9 on a current ubuntu lts. It is set > to Maildir and I backup the folder with the users maildata nightly via rsync. > > now, when someone deletes a mail that they still need, and I copy it back > from the backup, it will not be visible to mail clients. When I change the > mailfile by a letter or so, it shows. that's easy enough, if not exactly > awesome ;-)
Sounds like the message gets its old IMAP UID back, but since IMAP isn't designed for that, the clients don't realize it. By changing the filename the message gets a new UID. Although typically Dovecot should notice that and log an error and fix the situation, except if you've disabled index files. So..: Don't put the messages back to where you got them with the same names.
