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 DD5454196F3 for ; Tue, 13 Apr 2010 11:06:15 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -4.2 X-Spam-Level: X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] 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 Ou3x1Mk-1n4A for ; Tue, 13 Apr 2010 11:06:14 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by olra.theworths.org (Postfix) with ESMTP id 90CCF431FC1 for ; Tue, 13 Apr 2010 11:06:14 -0700 (PDT) Received: from localhost ([::1] helo=x200.gr8dns.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1O1kV3-0000Eg-Rf; Tue, 13 Apr 2010 18:06:14 +0000 Received: by x200.gr8dns.org (Postfix, from userid 500) id E8DC0C00E5; Tue, 13 Apr 2010 11:06:12 -0700 (PDT) From: Dirk Hohndel To: Carl Worth , Sebastian Spaeth , notmuch@notmuchmail.org Subject: Re: [PATCH] Fix code extracting the MTA from Received: headers In-Reply-To: <87eiijl0cy.fsf@yoom.home.cworth.org> References: <877hoil6i5.fsf@SSpaeth.de> <87eiijl0cy.fsf@yoom.home.cworth.org> Date: Tue, 13 Apr 2010 11:06:12 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html 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: Tue, 13 Apr 2010 18:06:16 -0000 On Tue, 13 Apr 2010 10:37:49 -0700, Carl Worth wrote: > On Thu, 08 Apr 2010 08:07:48 -0700, Dirk Hohndel wrote: > > Right now my plan is to do something like this: > > > > 1) look for my email address in To/Cc > > 2) look for my email in "for " in Received headers > > 3) look for my email in X-Original-To > > 4) look for the domain of my email in Received headers (not just 1st) > > 5) punt and use default email address > > > > Does that sound sane? > > It sounds sane. Good. > > (and thanks for sending the headers - this really helps... can others > > for whom the current code or the logic mentioned above wouldn't work > > send their headers, too, please?) > > I started using fetchmail many years ago and have never really needed to > switch. So I'm still using that, (but don't necessarily recommend it to > anyone. > > It seems to break the above since it delivers mail locally, so the first > headers I get are: > > X-Original-To: cworth@localhost Easy to detect. I'll add that as an exclusion > Delivered-To: cworth@localhost > Received: from yoom.home.cworth.org (yoom.home.cworth.org [127.0.0.1]) > by yoom.home.cworth.org (Postfix) with ESMTP id D391B5883A6 > for ; Mon, 12 Apr 2010 09:11:18 -0700 (PDT) > MIME-Version: 1.0 > Received: from 10.22.226.213 [10.22.226.213] > by yoom.home.cworth.org with IMAP (fetchmail-6.3.16) > for (single-drop); Mon, 12 Apr 2010 09:11:18 -0700 (PDT) AHHHHHHHH (he runs screaming out of the room) > And none of these are useful for your detection. Worse, the presence of > "cworth.org" in the above might throw your detection off before it could > find something useful like "intel.com" in a later Received header. I have some choice words for these headers... And an idea how to exclude these false positives as well... It's kind of a hack, but I'm thinking that in order for the "Received: ... by ..." part to be truly relevant to us, the from host should have a non-private IP address. Yes, I can envision within-your-own-network cases where none of the systems have a non-private email address... but then hopefully your last hop is correct... if not - your setup is even more screwed up than Carl's. > I'll send a complete message with full headers to you separately. Thanks > Perhaps I can just switch programs to transfer email and avoid this > problem. Anyone have a recommendation for something to transfer mail > From an imap server to the local matchine, (but *not* leaving it stored > on the imap server)[*]. I don't think offlineimap supports this mode > does it? Don't think so. I'm not going to comment on the usefulness of this mode in public :-) /D -- Dirk Hohndel Intel Open Source Technology Center