]> Sergey Matveev's repositories - public-inbox.git/blobdiff - scripts/import_slrnspool
v2: generate better Message-IDs for duplicates
[public-inbox.git] / scripts / import_slrnspool
index 98850591e0963eb0c24fa5b98290107c4bdc5e2b..7b6c9ab0656b9e0af0edb99f3fd58566451356de 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright (C) 2015-2016 all contributors <meta@public-inbox.org>
+# Copyright (C) 2015-2018 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
 # Incremental (or one-shot) importer of a slrnpull news spool
@@ -11,7 +11,7 @@
 use strict;
 use warnings;
 use PublicInbox::Config;
-use Email::MIME;
+use PublicInbox::MIME;
 use PublicInbox::Import;
 use PublicInbox::Git;
 sub usage { "Usage:\n".join('',grep(/\t/, `head -n 10 $0`)) }
@@ -58,7 +58,7 @@ for (; $exit == 0 && $n < $max; $n++) {
        open(my $fh, '<', $fn) or next;
        $max = $n + $max_gap;
 
-       my $mime = Email::MIME->new(eval { local $/; <$fh> });
+       my $mime = PublicInbox::MIME->new(eval { local $/; <$fh> });
        my $hdr = $mime->header_obj;
 
        # gmane rewrites Received headers, which increases spamminess