Parsing envelopes

Parsing envelopes

Post by Bob » Fri, 10 Nov 2006 01:43:41

In my application when I download batches of envelopes I find that once in
a while there is a server that does not follow the RFC or is having problem
with a specific message and the parsing gets miss alined. What do others to
when this occurs? Do you add extra verification of fields to make sure the
data is valid? I am parsing from a stream and it seems hard to figure out
if the data I am parsing matches what I think I am parsing.

I would appreciate any tips on handling these situations.


Parsing envelopes

Post by Sam » Fri, 10 Nov 2006 09:12:43

This is a MIME GnuPG-signed message. If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

Bob writes:

You could be talking about three completely different things.

1) The server returning a structurally invalid ENVELOPE response.

2) The server improperly parsed a well-formed message, and returned a
structurally valid ENVELOPE response, that incorrectly reports the MIME
structure of the message.

3) The server parsed a badly-formatted message that is faulty, in some way,
in its MIME structure. The server returned a structurally valid ENVELOPE
response, whose contents follow the "garbage in, garbage out" principle, but
you were expecting to receive a different kind of garbage.

In case 1, you should report an error -- the same error you would normally
report if the server returned an invalid response, according to your
understanding of IMAP.

In cases 2 or 3, you should accurately represent the data returned by the
server. Trying to second-guess what the message actually contains, only
leads to madness and chaos.

Version: GnuPG v1.4.5 (GNU/Linux)