From: Eric Wong <e@80x24.org>
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 [thread overview]
Message-ID: <20160409011555.6732-1-e@80x24.org> (raw)
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
next reply other threads:[~2016-04-09 1:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-09 1:15 Eric Wong [this message]
2016-04-09 1:23 ` [PATCH] filter: remove out dated comments Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160409011555.6732-1-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).