owainlewis / clojure-mail

A Clojure library for parsing, downloading and reading email from IMAP servers.
202 stars 54 forks source link

Missing Received headers #36

Closed f0086 closed 8 years ago

f0086 commented 8 years ago

Some header fields like "Received" appear are more than one time in a mail header. So, a Hash is not a good idea to put in the header fields. This results in missing "Received" fields, because the key is unique.

Example:

E-Mail

Return-Path: <newsletter@basislager.de>
X-Original-To: aaron@gridbag.net
Delivered-To: aaron@gridbag.net
Received: by remote.gridbag.net (Postfix, from userid 5001)
    id 1A4894E0698; Fri,  2 Oct 2015 16:46:50 +0200 (CEST)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
    lvps83-169-3-141.dedicated.hosteurope.de
X-Spam-Level: 
X-Spam-Status: No, score=-0.7 required=6.0 tests=RCVD_IN_DNSWL_LOW,
    URIBL_BLOCKED autolearn=unavailable version=3.3.1
Received: from vwp11863.webpack.hosteurope.de (vwp11863.webpack.hosteurope.de [91.250.70.227])
    (using TLSv1 with cipher AES256-SHA (256/256 bits))
    (No client certificate requested)
    by remote.gridbag.net (Postfix) with ESMTPS id D676F4E0613
    for <mail@aaron-mueller.de>; Fri,  2 Oct 2015 16:46:49 +0200 (CEST)
Received: from pd95c6860.dip0.t-ipconnect.de ([217.92.104.96] helo=[192.168.20.12]); authenticated
    by vwp11863.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
    id 1Zi1bi-0006zp-VF; Fri, 02 Oct 2015 16:46:47 +0200

Parser result:

...., "Received" "from pd95c6860.dip0.t-ipconnect.de ([217.92.104.96] helo=[192.168.20.12]); authenticated\r\n\tby vwp11863.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)\r\n\tid 1Zi1bi-0006zp-VF; Fri, 02 Oct 2015 16:46:47 +0200",  ....