From: Alex Schroeder <alex@gnu.org>
To: info-gnus-english@gnu.org
Subject: Deleting duplicates from nnml:mail.misc
Date: Tue, 08 Oct 2013 01:00:10 +0200 [thread overview]
Message-ID: <m24n8sit51.fsf@gnu.org> (raw)
I've started using Gnus again after many years. I had a ton of
mbox files I had created using fetchmail from my Gmail account,
but didn't really trust it, ran it a lot, thought that maybe it
didn't get my sent messages and therefore moved a lot of messages
from the Gmail IMAP to my nnml:mail.misc using B m ... and now I'm
suddenly having second thoughts. Is my nnml:mail.misc of about
60000 messages full of duplicates?
I've been wondering how to find them, if any. I've tried looking at the
.overview file...
#!/bin/env perl
my %count = ();
my %file = ();
my $overview = "/Volumes/Extern/Archives/Mail/mail/misc/.overview";
open(F, $overview) or die "Cannot open $overview: $!";
while(my $line = <F>) {
my @field = split(/\t/, $line);
$count{$field[4]}++;
push(@{$file{$field[4]}}, $field[0]);
}
close(F);
my @keys = sort { $count{$b} cmp $count{$a} } keys %count;
print join("\n", map {
$_ . "\t" . $count{$_} . "\t" . join(", ", @{$file{$_}})
} @keys[0 .. 3]) . "\n";
How would I best use this script to delete the duplicate messages? Can I
"regenerate" the overview file without loosing anything, perhaps by
regenrating something in the Server buffer? Or is there an elisp version
of the above that does the right thing?
Cheers
Alex
next reply other threads:[~2013-10-07 23:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-07 23:00 Alex Schroeder [this message]
2013-10-13 18:44 ` Alex Schroeder
2013-10-14 7:16 ` Thien-Thi Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m24n8sit51.fsf@gnu.org \
--to=alex@gnu.org \
--cc=info-gnus-english@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).