From: Eric Wong Date: Sun, 20 Apr 2014 19:47:34 +0000 (+0000) Subject: mda: keep Status: header when doing injection X-Git-Tag: v0.0.0~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4e089d73c12db85dd50523b4c2ffbf7ec660b466;p=ssoma-mda.git 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. --- 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);