From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2997C20469 for ; Sat, 9 Apr 2016 01:15:55 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] filter: preserve Mail-Followup-To and Mail-Reply-To Date: Sat, 9 Apr 2016 01:15:55 +0000 Message-Id: <20160409011555.6732-1-e@80x24.org> List-Id: Allow users to do wacky things here if they really wish... It's bad practice, but at least allow other readers to mock users of these headers :P --- lib/PublicInbox/Filter.pm | 3 +-- t/filter.t | 18 ------------------ 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/lib/PublicInbox/Filter.pm b/lib/PublicInbox/Filter.pm index ea6fd33..4fdbe87 100644 --- a/lib/PublicInbox/Filter.pm +++ b/lib/PublicInbox/Filter.pm @@ -33,8 +33,7 @@ sub run { # we should do this before it gets to ssoma. # We also kill Mail-{Followup,Reply}-To headers due to # the nature of public-inbox having no real subscribers. - foreach my $d (qw(status lines content-length - mail-followup-to mail-reply-to)) { + foreach my $d (qw(status lines content-length)) { $mime->header_set($d); } diff --git a/t/filter.t b/t/filter.t index 80a7c12..609a192 100644 --- a/t/filter.t +++ b/t/filter.t @@ -297,24 +297,6 @@ sub count_body_parts { like($s->as_string, qr/scrubbed/, "scrubbed message"); } -{ - my $s = Email::MIME->create( - header => [ - From => 'a@example.com', - To => 'b@example.com', - 'Content-Type' => 'text/plain', - 'Mail-Followup-To' => 'c@example.com', - Subject => 'mfttest', - ], - body => "mft\n", - ); - - is('c@example.com', $s->header("Mail-Followup-To"), - "mft set correctly"); - is(1, PublicInbox::Filter->run($s), "run succeeded for mft"); - is(undef, $s->header("Mail-Followup-To"), "mft stripped"); -} - # multi-part with application/octet-stream { my $os = 'application/octet-stream'; -- EW