]> Sergey Matveev's repositories - public-inbox.git/blobdiff - script/public-inbox-mda
add filter for Subject: tags
[public-inbox.git] / script / public-inbox-mda
index d76f33a81ade85826a09378e7988f248043b31bd..60f817dc08d4afb4f64ef0667da789dc38af889f 100755 (executable)
@@ -52,7 +52,7 @@ $simple = undef;
 $emm = PublicInbox::Emergency->new($emergency);
 $emm->prepare(\$str);
 $ems = $ems->abort;
-my $mime = Email::MIME->new(\$str);
+my $mime = PublicInbox::MIME->new(\$str);
 $str = '';
 do_exit(0) unless $spam_ok;
 
@@ -83,7 +83,6 @@ PublicInbox::MDA->set_list_headers($mime, $dst);
 my $git = PublicInbox::Git->new($main_repo);
 my $im = PublicInbox::Import->new($git, $dst->{name}, $recipient);
 if (defined $im->add($mime)) {
-       $im->done;
        $emm = $emm->abort;
 } else {
        # this message is similar to what ssoma-mda shows:
@@ -92,4 +91,5 @@ if (defined $im->add($mime)) {
                        " exists\n";
 }
 
+$im->done;
 do_exit(0);