From 4e089d73c12db85dd50523b4c2ffbf7ec660b466 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 20 Apr 2014 19:47:34 +0000 Subject: [PATCH] mda: keep Status: header when doing injection Non-public-inbox users may want to archive their personal email with ssoma, so preserve the Status: line if it exists. public-inbox already kills the Status: header. --- lib/Ssoma/MDA.pm | 2 +- t/mda-badheaders.t | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Ssoma/MDA.pm b/lib/Ssoma/MDA.pm index 3fe7e0b..02816a5 100644 --- a/lib/Ssoma/MDA.pm +++ b/lib/Ssoma/MDA.pm @@ -122,7 +122,7 @@ sub deliver { my $path = $git->mid2path($mid); # kill potentially confusing/misleading headers - foreach my $d (qw(status lines content-length)) { + foreach my $d (qw(lines content-length)) { $simple->header_set($d); } diff --git a/t/mda-badheaders.t b/t/mda-badheaders.t index c363035..b161574 100644 --- a/t/mda-badheaders.t +++ b/t/mda-badheaders.t @@ -21,12 +21,11 @@ my %headers = ( "From" => "You ", "Message-ID" => "<666\@example.com>", "Subject" => ":o", - "Status" => "RO", "Lines" => "666", "Content-Length" => "666", ); -my %discard = map { $_ => 1 } qw(Status Lines Content-Length); +my %discard = map { $_ => 1 } qw(Lines Content-Length); while (my ($key, $val) = each %headers) { $email->header_set($key, $val); -- 2.26.2