]> Sergey Matveev's repositories - public-inbox.git/commitdiff
public-inbox-mda: reject messages without From header
authorEric Wong <normalperson@yhbt.net>
Tue, 11 Feb 2014 00:29:13 +0000 (00:29 +0000)
committerEric Wong <normalperson@yhbt.net>
Tue, 11 Feb 2014 00:29:13 +0000 (00:29 +0000)
public-inbox-mda

index 72f1eac4b41f04b6f51eb2bd01bb1b4fc347c323..62d5b7fc9e51064fa97b90752a2710d6ff59a3d2 100755 (executable)
@@ -14,7 +14,8 @@ my $fail_repo = shift @ARGV or die "Usage: $usage\n";
 my $max = 1024 * 500; # same as spamc
 
 my $filtered;
-if (length($filter->simple->as_string) <= $max
+if ($filter->simple->header("From")
+    && length($filter->simple->as_string) <= $max
     && PublicInbox->recipient_specified($filter)
     && do_spamc($filter->simple, \$filtered)) {
        # update our message with SA headers (in case our filter rejects it)