From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.204.137.132 with SMTP id w4cs77238bkt; Mon, 19 Apr 2010 23:28:37 -0700 (PDT) Received: by 10.216.85.135 with SMTP id u7mr1648805wee.51.1271744916750; Mon, 19 Apr 2010 23:28:36 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id v4si20095139wbb.103.2010.04.19.23.28.36; Mon, 19 Apr 2010 23:28:36 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 5BE421858318; Tue, 20 Apr 2010 02:28:35 -0400 (EDT) Received: from mail2.nadir.org (unknown [217.114.68.170]) by rubyforge.org (Postfix) with ESMTP id D8C3718582D4 for ; Tue, 20 Apr 2010 02:28:21 -0400 (EDT) Received: (qmail 22380 invoked by uid 1008); 20 Apr 2010 06:28:20 -0000 Received: from mail.nadir.org (HELO mail.nadir.org) (mail.nadir.org) by mail.nadir.org with ESMTPA; 20 Apr 2010 06:28:20 -0000 Date: Tue, 20 Apr 2010 08:26:00 +0200 From: Sam Hall To: Sup developer discussion Message-ID: <20100420062557.GA31729@jurbIgebBeddUfs2> References: <1271662579-sup-4883@midna.zekjur.net> <20100419125537.GA19586@3QuajwodyerfIj> <1271692464-sup-1637@midna.zekjur.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1271692464-sup-1637@midna.zekjur.net> Subject: Re: [sup-devel] RubyMail cannot handle multipart/signed messages X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org On Mon, Apr 19, 2010 at 17:57 (+0200), Michael Stapelberg wrote: > The problem arises as soon as you try to iterate over the content of the mail. > You will see that it only contains 2 parts (according to 'mail'), while there > are at least three text files, a signature and a text part: The first part is a multipart-message in itself, you have to recurse to get hands on its parts: irb(main):012:0> pp mail.parts.first.parts.map { |p| p.content_type } ["text/plain; charset=US-ASCII", "text/plain; charset=US_ASCII", "text/plain; charset=US_ASCII", "text/plain; charset=US_ASCII", "text/plain; charset=US_ASCII"] This is not only legal, RFC 3156 even requires this (in 5.): The multipart/signed body MUST consist of exactly two parts. The first part contains the signed data in MIME canonical format, including a set of appropriate content headers describing the data. The second body MUST contain the OpenPGP digital signature. It MUST be labeled with a content type of "application/pgp-signature". Best wishes, Sam _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel