Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 29E93431FC2 for ; Thu, 4 Feb 2010 12:54:22 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.866 X-Spam-Level: X-Spam-Status: No, score=-1.866 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1.8, AWL=-0.067, BAYES_50=0.001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q1e7nM4+SHyg; Thu, 4 Feb 2010 12:54:21 -0800 (PST) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 21EEB431FAE; Thu, 4 Feb 2010 12:54:21 -0800 (PST) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id CC2375500D4; Fri, 5 Feb 2010 09:54:20 +1300 (NZDT) From: Carl Worth To: Jed Brown In-Reply-To: <1259450376-24523-2-git-send-email-jed@59A2.org> References: <87r5ripfy2.fsf@yoom.home.cworth.org> <1259450376-24523-1-git-send-email-jed@59A2.org> <1259450376-24523-2-git-send-email-jed@59A2.org> Date: Thu, 04 Feb 2010 12:54:20 -0800 Message-ID: <87k4uspvr7.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/2] notmuch-reply.c: Handle munged `Reply-To' headers. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 20:54:22 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Sun, 29 Nov 2009 00:19:36 +0100, Jed Brown wrote: > Some mailing lists engage in the evil practice of changing the Reply-To > header so that replies from all mailers go to the list by default, at > the expense of not responding to the person who actually sent the > message. When this is detected, we reply to `From' and remove the > duplicate response to the mailing list. Consider a reply to the > following message. Thanks for the patch, Jed! I've gone ahead and pushed this out, (along with some cleanups/fixes). I augmented the notmuch test suite to actually test this case, (and the related case of honoring Reply-To for a non-munged message). And I'm glad I did because that turned up a bug in the patch, (using =3D=3D instead of !=3D for the return value of strcasestr resulted in *all* messages with a Reply-To header being considered as munged). Here's one cleanup I made which you might find interesting as a style issue (where I prefer naming a function based on what it *does* rather than on what it's being *used* for): commit d111c720bad53f98edba958aa605e857036a2bc8 Author: Carl Worth Date: Thu Feb 4 12:39:11 2010 -0800 notmuch reply: Rename the mailing_list_munged_reply_to function =20=20=20=20 This function detects whether the address in the Reply-To header already appears in either To or Cc. So give it a name that reflects what it does (reply_to_header_is_redundant) rather than the old name which described one possible use of the function, (as a simple heuristic for detecting whether a mailing list had applied reply-to munging). =2DCarl --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLazP86JDdNq8qSWgRAi40AJ9A7iyLK9A2tCOgnkAgQohj/kyU8wCgpfX6 IStxgD+IRQFVkLiQM6ETD8s= =RQHL -----END PGP SIGNATURE----- --=-=-=--