From mboxrd@z Thu Jan 1 00:00:00 1970 From: ezyang@MIT.EDU (Edward Z. Yang) Date: Sat, 25 Jul 2009 14:24:15 -0400 Subject: [sup-talk] Reply calculation In-Reply-To: <1248545266-sup-6886@javelin> References: <1248545266-sup-6886@javelin> Message-ID: <1248546228-sup-9505@javelin> Here is a patch that changes the behavior: >From 58a8d325286703f9057dd5d07094d0c6a061377c Mon Sep 17 00:00:00 2001 From: Edward Z. Yang 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 --- 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