From bf4630c098ad7159ba36dea6cfe77c4cf6806ffe Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 10 Jan 2014 23:50:16 +0000 Subject: reject messages if ORIGINAL_RECIPIENT is not specified SpamAssassin doesn't seem to have this heuristic, but the lack of the intended email address in To:/Cc: headers cannot be a good sign (especially when this is a _public_ inbox). --- public-inbox-mda | 2 ++ 1 file changed, 2 insertions(+) (limited to 'public-inbox-mda') diff --git a/public-inbox-mda b/public-inbox-mda index 177c891e..72f1eac4 100755 --- a/public-inbox-mda +++ b/public-inbox-mda @@ -4,6 +4,7 @@ use strict; use warnings; use Email::Filter; +use Email::Address; use PublicInbox::Filter; use IPC::Run qw(run); my $usage = "public-inbox-mda main_repo fail_repo < rfc2822_message"; @@ -14,6 +15,7 @@ my $max = 1024 * 500; # same as spamc my $filtered; if (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) my $simple = Email::Simple->new($filtered); -- cgit v1.2.3-24-ge0c7