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 1AEAD4196F2 for ; Fri, 16 Apr 2010 13:51:56 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.8 X-Spam-Level: X-Spam-Status: No, score=0.8 tagged_above=-999 required=5 tests=[BAYES_50=0.8] 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 ecSMVe9fRfrd for ; Fri, 16 Apr 2010 13:51:55 -0700 (PDT) Received: from mail.hohndel.org (mail.hohndel.org [65.23.157.147]) by olra.theworths.org (Postfix) with ESMTP id 46BEF431FC1 for ; Fri, 16 Apr 2010 13:51:55 -0700 (PDT) Received: by mail.hohndel.org (Postfix, from userid 112) id 7AD63340FF; Fri, 16 Apr 2010 16:51:54 -0400 (EDT) Received: from x200.gr8dns.org (unknown [65.23.157.147]) by mail.hohndel.org (Postfix) with ESMTP id 1926C340F8 for ; Fri, 16 Apr 2010 16:51:53 -0400 (EDT) Received: by x200.gr8dns.org (Postfix, from userid 500) id B08D4C01BC; Fri, 16 Apr 2010 13:51:52 -0700 (PDT) From: Dirk Hohndel To: Subject: improve from-header guessing Date: Fri, 16 Apr 2010 13:51:40 -0700 Message-Id: <1271451102-11336-1-git-send-email-hohndel@infradead.org> X-Mailer: git-send-email 1.6.6.1 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: Fri, 16 Apr 2010 20:51:56 -0000 The following two patches should address most of the concerns raised to my previous series. The first patch simply adds an interface to obtain a concatenation of all instances of a specific header from an email. The second patch uses that in order to get the full Received: headers. It now looks at Envelope-to: and X-Original-To: headers, then at the concatenated Received headers for either a "for email@add.res" clause that matches a configured address or for a " by " clause that matches the domain of a configured address. What is still missing is the check if the host from which the mail was received in this last case had a routable IP address.