From: Sam Hall <samhall@riseup.net>
To: Sup developer discussion <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] RubyMail cannot handle multipart/signed messages
Date: Tue, 20 Apr 2010 08:26:00 +0200 [thread overview]
Message-ID: <20100420062557.GA31729@jurbIgebBeddUfs2> (raw)
In-Reply-To: <1271692464-sup-1637@midna.zekjur.net>
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
next prev parent reply other threads:[~2010-04-20 6:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-19 7:43 Michael Stapelberg
2010-04-19 12:55 ` Sam Hall
2010-04-19 15:57 ` Michael Stapelberg
2010-04-20 6:26 ` Sam Hall [this message]
2010-04-20 6:40 ` Michael Stapelberg
2010-04-20 15:27 ` Rich Lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100420062557.GA31729@jurbIgebBeddUfs2 \
--to=samhall@riseup.net \
--cc=sup-devel@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox