[PATCH] Fix code extracting the MTA from Received: headers

Sebastian Spaeth Sebastian at SSpaeth.de
Thu Apr 8 00:59:14 PDT 2010


On 2010-04-07, Dirk Hohndel wrote:
> 
> The previous code made too many assumptions about the (sadly not
> standardized) format of the Received headers. This version should
> be more robust to deal with different variations.

This code might be useful for some, but I know it is not being useful
for me. I use e.g. dreamhost.com as my mail provider and I never have my
email domain name show up after the Received: by .....
See my Received headers for your message below.

On the other hand, it contains "for <sebastian at sspaeth.de>" stating the
intended email address explicitely. IMHO, we should use this before we
start some hand-wavy guessing.

Also, I have the "X-Original-To: sebastian at sspaeth.de" header. Is that
something that we could make use of before starting to guess?

Sebastian
-----------------------------------------------------------------------
Received: from segal.dreamhost.com (mx1.spunky.mail.dreamhost.com [208.97.132.47])
	by homiemail-mx12.g.dreamhost.com (Postfix) with ESMTP id 9A6602781BC
	for <sebastian at sspaeth.de>; Wed,  7 Apr 2010 13:38:48 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by segal.dreamhost.com (Postfix) with ESMTP id 9CF8A5341BE
	for <sebastian at sspaeth.de>; Wed,  7 Apr 2010 13:38:48 -0700 (PDT)
Received: from connor.dreamhost.com ([208.97.132.81])
	by localhost (segal.dreamhost.com [208.97.132.104]) (amavisd-new, port 10024)
	with ESMTP id S3IlsMcJewY1 for <sebastian at sspaeth.de>;
	Wed,  7 Apr 2010 13:38:39 -0700 (PDT)
Received: from olra.theworths.org (u15218177.onlinehome-server.com [82.165.184.25])
	by connor.dreamhost.com (Postfix) with ESMTP id 33B472C9806F
	for <sebastian at sspaeth.de>; Wed,  7 Apr 2010 13:38:39 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by olra.theworths.org (Postfix) with ESMTP id 1978741733A;
	Wed,  7 Apr 2010 13:38:38 -0700 (PDT)
X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
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 ZbcQaubefNY6; Wed,  7 Apr 2010 13:38:37 -0700 (PDT)
Received: from olra.theworths.org (localhost [127.0.0.1])
	by olra.theworths.org (Postfix) with ESMTP id 044574196F4;
	Wed,  7 Apr 2010 13:38:35 -0700 (PDT)


More information about the notmuch mailing list