summaryrefslogtreecommitdiff
path: root/notmuch-slurp-debbug
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2018-10-27 10:54:54 -0700
committerSean Whitton <spwhitton@spwhitton.name>2018-10-27 10:54:54 -0700
commit3b12d553352ded4a3eab96764e799ce6a383a046 (patch)
treeca1dac47b23b9df07a7afc9350a340788ffabf84 /notmuch-slurp-debbug
parent20b5fe40ce67c6bea5a5d23898d224a8bc0cc0f3 (diff)
downloadmailscripts-3b12d553352ded4a3eab96764e799ce6a383a046.tar.gz
notmuch-slurp-debbug: skip messages without a Message-Id
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'notmuch-slurp-debbug')
-rwxr-xr-xnotmuch-slurp-debbug3
1 files changed, 3 insertions, 0 deletions
diff --git a/notmuch-slurp-debbug b/notmuch-slurp-debbug
index 226a095..d289e31 100755
--- a/notmuch-slurp-debbug
+++ b/notmuch-slurp-debbug
@@ -89,6 +89,9 @@ system("mbox2maildir $mbox $dir") == 0
foreach my $message (glob "$dir/*/*") {
my $message_head = MIME::Head->from_file($message);
my $mid = $message_head->get('Message-ID');
+ # if this message does not have a message-id, do not import it;
+ # that is asking for trouble
+ next unless defined $mid;
$mid =~ s/(<|>)//g;
my $match = `notmuch search id:$mid`;
my $match_lines = $match =~ tr/\n//;