]> Sergey Matveev's repositories - public-inbox.git/commitdiff
filter: preserve Mail-Followup-To and Mail-Reply-To
authorEric Wong <e@80x24.org>
Sat, 9 Apr 2016 00:57:26 +0000 (00:57 +0000)
committerEric Wong <e@80x24.org>
Sat, 9 Apr 2016 00:57:26 +0000 (00:57 +0000)
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
t/filter.t

index ea6fd33f06d18d1a8278535bd2e3d0c166845da4..4fdbe87e35adfd7dd6cf475dadd04ff5bfe1ab36 100644 (file)
@@ -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);
        }
 
index 80a7c123ae41078ca42bba187803c4bb9daf6232..609a19297f3b4094db0326754f998442a57e2d77 100644 (file)
@@ -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';