summaryrefslogtreecommitdiff
path: root/scripts/mail
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-10-26 08:32:06 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-10-26 08:32:06 -0700
commit38bb9fef5a5942a47e4811a0f4b0746ce8a439de (patch)
treecadc093b0b08464435259b4fdc91805e936b0b19 /scripts/mail
parent9ce2d55a62c721b589123ebd87395a9422d5bbad (diff)
downloaddotfiles-38bb9fef5a5942a47e4811a0f4b0746ce8a439de.tar.gz
commit some checking scripts
Diffstat (limited to 'scripts/mail')
-rw-r--r--scripts/mail/all_msgids16
-rw-r--r--scripts/mail/compare_msgids15
2 files changed, 31 insertions, 0 deletions
diff --git a/scripts/mail/all_msgids b/scripts/mail/all_msgids
new file mode 100644
index 00000000..c97cb85d
--- /dev/null
+++ b/scripts/mail/all_msgids
@@ -0,0 +1,16 @@
+use 5.028;
+use strict;
+use warnings;
+
+use Mail::Box::Manager;
+
+our @maildirs = grep !/annex\z/, glob "$ENV{HOME}/.fmail/*";
+
+my $mgr = Mail::Box::Manager->new;
+
+foreach my $dir (@maildirs) {
+ my $md = $mgr->open($dir, access => 'r', create => 0, keep_dups => 1, type => 'maildir');
+ for ($md->messages) {
+ say "$dir ".$_->messageId;
+ }
+}
diff --git a/scripts/mail/compare_msgids b/scripts/mail/compare_msgids
new file mode 100644
index 00000000..6918a004
--- /dev/null
+++ b/scripts/mail/compare_msgids
@@ -0,0 +1,15 @@
+use 5.028;
+use strict;
+use warnings;
+
+my ($fh, @athena, %melete);
+open $fh, "<", "$ENV{HOME}/tmp/athena_msgids";
+push @athena, $_ while <$fh>;
+close $fh;
+open $fh, "<", "$ENV{HOME}/tmp/melete_msgids";
+$melete{$_} = undef while <$fh>;
+close $fh;
+
+for (@athena) {
+ exists $melete{$_} or say "on athena but not melete: $_";
+}