about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2014-02-25 22:26:35 +0000
committerEric Wong <normalperson@yhbt.net>2014-02-25 22:26:35 +0000
commitb5f82d05569c228544f31627a03477f2a464f74f (patch)
treedc3060bb1a75c7ca862f21ba1f84725051da9e04 /lib
parent25cc5a69a4a38076ea9e587dfa75165fef2273da (diff)
downloadpublic-inbox-b5f82d05569c228544f31627a03477f2a464f74f.tar.gz
Valid emails should not arrive without a Message-ID.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox.pm b/lib/PublicInbox.pm
index 899027be..56137d14 100644
--- a/lib/PublicInbox.pm
+++ b/lib/PublicInbox.pm
@@ -16,8 +16,10 @@ sub __drop_plus {
 # do not allow Bcc, only Cc and To if ORIGINAL_RECIPIENT (postfix) env is set
 sub precheck {
         my ($klass, $filter) = @_;
+        my $simple = $filter->simple;
+        return 0 unless $simple->header("Message-ID");
         return 0 unless defined($filter->from);
-        return 0 if length($filter->simple->as_string) > MAX_SIZE;
+        return 0 if length($simple->as_string) > MAX_SIZE;
         recipient_specified($filter);
 }