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 ;-) But, if said person deletes a whole folder of mails, this way to make restored mails show up becomes rather unreasonable. surely there is a better way to do this? I'd be glad for any and all hints! =) best regards silvana -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
On 30 Apr 2012, at 10:59, oni-neko at gmx.net 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 ;-) > > But, if said person deletes a whole folder of mails, this way to make restored mails show up becomes rather unreasonable. > > surely there is a better way to do this? I'd be glad for any and all hints! =) > > best regards > silvana > -- > Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir > belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.deHi, Not sure about the availability on version 1.2.9, but the following command should do the trick: doveadm force-resync -u <username> <mailboxname> Regards, Thierry
On Mon, 2012-04-30 at 10:59 +0200, oni-neko at gmx.net 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.