On Monday, 2 June 2025 16:34:12 British Summer Time Peter Humphrey wrote: > On Monday, 2 June 2025 13:03:54 British Summer Time Stefan Schmiedl wrote: > > ------ Original Message ------ > > From "Peter Humphrey" <pe...@prh.myzen.co.uk> > > To gentoo-user@lists.gentoo.org > > Date 02.06.2025 11:52:34 > > Subject [gentoo-user] Recovering mail > > > > >Greetings, > > > > > >My user's .maildir has overfilled and so I've lost some emails. However, > > >I > > >have a cron job running every five minutes to rsync .maildir to > > >/mnt/mailbu. The question is: can I just copy mailbu over .maildir? > > > > There might be some duplicates depending on e.g. the message state, > > which is encoded in the filename. > > > > Try rsync -avn /mnt/malibu/ ~/.maildir for a dry-run that should > > tell you what would be copied. If the results look reasonable > > stop dovecot and kmail, run again without the -n, start dovecot. > > > > At least that's what I would do to fix my maildir. > > Well, that's recovered all the missing ones (an awful lot of them, anyway), > but I now have thousands of duplicates to find and delete. > > > Good luck, > > Thanks :)
The 'doveadm deduplicate' should be able to remove duplicates, or you can check this mail-deduplicate purpose written utility: https://github.com/kdeldycke/mail-deduplicate Dry-run will allow you to check what may be deleted, before you let it loose on your maildir.
signature.asc
Description: This is a digitally signed message part.