From: ezyang@MIT.EDU (Edward Z. Yang)
Subject: [sup-talk] Reply calculation
Date: Sat, 25 Jul 2009 14:24:15 -0400 [thread overview]
Message-ID: <1248546228-sup-9505@javelin> (raw)
In-Reply-To: <1248545266-sup-6886@javelin>
Here is a patch that changes the behavior:
From 58a8d325286703f9057dd5d07094d0c6a061377c Mon Sep 17 00:00:00 2001
From: Edward Z. Yang <ezyang at mit.edu>
Date: Sat, 25 Jul 2009 14:17:08 -0400
Subject: [PATCH] Use Reply-to if it is explicitly set.
Previously, Sup would ignore an explicit Reply-to
in favor of List-id. This is the wrong behavior for
the following cases:
* List subscribe and unsubscribe messages will commonly
have List-id set, but set Reply-to for their own
nefarious purposes (the "you should be able to reply
to this email and have it work")
* People will sometimes send mail to a list with an
explicit Reply-to header to get responses offlist.
This brings Sup's behavior more inline with traditional
mail clients. Since most lists already set Reply-to
(and most mail clients don't respect List-id), there will
probably be no breakage.
Signed-off-by: Edward Z. Yang <ezyang at mit.edu>
---
lib/sup/modes/reply-mode.rb | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb
index c79c5db..ca423c1 100644
--- a/lib/sup/modes/reply-mode.rb
+++ b/lib/sup/modes/reply-mode.rb
@@ -81,10 +81,8 @@ EOS
AccountManager.default_account
end
- ## now, determine to: and cc: addressess. we ignore reply-to for list
- ## messages because it's typically set to the list address, which we
- ## explicitly treat with reply type :list
- to = @m.is_list_message? ? @m.from : (@m.replyto || @m.from)
+ ## if someone overrode reply-to, it was for a good reason
+ to = (@m.replyto || @m.from)
## next, cc:
cc = (@m.to + @m.cc - [from, to]).uniq
@@ -115,7 +113,7 @@ EOS
} unless not_me_ccs.empty?
@headers[:list] = {
- "To" => [@m.list_address.full_address],
+ "To" => [@m.replyto.full_address || @m.list_address.full_address],
} if @m.is_list_message?
refs = gen_references
--
1.6.3.3
next prev parent reply other threads:[~2009-07-25 18:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-25 18:10 Edward Z. Yang
2009-07-25 18:24 ` Edward Z. Yang [this message]
2009-07-25 19:03 ` Edward Z. Yang
2009-07-25 19:15 ` Edward Z. Yang
2009-07-27 16:49 ` William Morgan
2009-07-27 17:09 ` Edward Z. Yang
2009-07-28 15:48 ` William Morgan
2009-07-28 18:34 ` Edward Z. Yang
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1248546228-sup-9505@javelin \
--to=ezyang@mit.edu \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox