Re: [PATCH] Fix code extracting the MTA from Received: headers
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Thu, 8 Apr 2010 07:59:14 +0000 (09:59 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:31 +0000 (09:36 -0800)
cb/d6f5e4d37cd7321c1198d810650b4bba4c5caa [new file with mode: 0644]

diff --git a/cb/d6f5e4d37cd7321c1198d810650b4bba4c5caa b/cb/d6f5e4d37cd7321c1198d810650b4bba4c5caa
new file mode 100644 (file)
index 0000000..b309b44
--- /dev/null
@@ -0,0 +1,91 @@
+Return-Path: <Sebastian@SSpaeth.de>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 017214196F0\r
+       for <notmuch@notmuchmail.org>; Thu,  8 Apr 2010 00:59:20 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.001\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5\r
+       tests=[BAYES_40=-0.001] autolearn=ham\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id eaF9d-xTG9Xz for <notmuch@notmuchmail.org>;\r
+       Thu,  8 Apr 2010 00:59:18 -0700 (PDT)\r
+Received: from homiemail-a13.g.dreamhost.com (caiajhbdccah.dreamhost.com\r
+       [208.97.132.207])\r
+       by olra.theworths.org (Postfix) with ESMTP id DA016431FC1\r
+       for <notmuch@notmuchmail.org>; Thu,  8 Apr 2010 00:59:18 -0700 (PDT)\r
+Received: from sspaeth.de (unknown [195.190.188.219])\r
+       by homiemail-a13.g.dreamhost.com (Postfix) with ESMTPA id C48756A8076; \r
+       Thu,  8 Apr 2010 00:59:16 -0700 (PDT)\r
+Received: by sspaeth.de (sSMTP sendmail emulation);\r
+       Thu, 08 Apr 2010 09:59:14 +0200\r
+From: "Sebastian Spaeth" <Sebastian@SSpaeth.de>\r
+To: Dirk Hohndel <hohndel@infradead.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] Fix code extracting the MTA from Received: headers\r
+In-Reply-To: <m31verxaka.fsf@x200.gr8dns.org>\r
+References: <m31verxaka.fsf@x200.gr8dns.org>\r
+Date: Thu, 08 Apr 2010 09:59:14 +0200\r
+Message-ID: <877hoil6i5.fsf@SSpaeth.de>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 08 Apr 2010 07:59:20 -0000\r
+\r
+On 2010-04-07, Dirk Hohndel wrote:\r
+> \r
+> The previous code made too many assumptions about the (sadly not\r
+> standardized) format of the Received headers. This version should\r
+> be more robust to deal with different variations.\r
+\r
+This code might be useful for some, but I know it is not being useful\r
+for me. I use e.g. dreamhost.com as my mail provider and I never have my\r
+email domain name show up after the Received: by .....\r
+See my Received headers for your message below.\r
+\r
+On the other hand, it contains "for <sebastian@sspaeth.de>" stating the\r
+intended email address explicitely. IMHO, we should use this before we\r
+start some hand-wavy guessing.\r
+\r
+Also, I have the "X-Original-To: sebastian@sspaeth.de" header. Is that\r
+something that we could make use of before starting to guess?\r
+\r
+Sebastian\r
+-----------------------------------------------------------------------\r
+Received: from segal.dreamhost.com (mx1.spunky.mail.dreamhost.com [208.97.132.47])\r
+       by homiemail-mx12.g.dreamhost.com (Postfix) with ESMTP id 9A6602781BC\r
+       for <sebastian@sspaeth.de>; Wed,  7 Apr 2010 13:38:48 -0700 (PDT)\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by segal.dreamhost.com (Postfix) with ESMTP id 9CF8A5341BE\r
+       for <sebastian@sspaeth.de>; Wed,  7 Apr 2010 13:38:48 -0700 (PDT)\r
+Received: from connor.dreamhost.com ([208.97.132.81])\r
+       by localhost (segal.dreamhost.com [208.97.132.104]) (amavisd-new, port 10024)\r
+       with ESMTP id S3IlsMcJewY1 for <sebastian@sspaeth.de>;\r
+       Wed,  7 Apr 2010 13:38:39 -0700 (PDT)\r
+Received: from olra.theworths.org (u15218177.onlinehome-server.com [82.165.184.25])\r
+       by connor.dreamhost.com (Postfix) with ESMTP id 33B472C9806F\r
+       for <sebastian@sspaeth.de>; Wed,  7 Apr 2010 13:38:39 -0700 (PDT)\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1978741733A;\r
+       Wed,  7 Apr 2010 13:38:38 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id ZbcQaubefNY6; Wed,  7 Apr 2010 13:38:37 -0700 (PDT)\r
+Received: from olra.theworths.org (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 044574196F4;\r
+       Wed,  7 Apr 2010 13:38:35 -0700 (PDT)\r