9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: presotto@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] mime
Date: Wed, 22 Nov 2000 15:49:43 -0500	[thread overview]
Message-ID: <20001122204959.D4FE0199F5@mail.cse.psu.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 1866 bytes --]

You don't have to know the transfer encoding when parsing the header.
According to 822,

	Each header field can be viewed as a single, logical  line  of
	ASCII  characters,  comprising  a field-name and a field-body.

Of course 821 states

	The maximum total length of a text line including the
	<CRLF> is 1000 characters (but not counting the leading
	dot duplicated for transparency).

To stay consistent with these, headers need to be in the
7bit domain.  However, rfc2047 provides the amazing
=?b?gobbledeygook?= syntax to allow non ascii tokens in the
header.

Therefore, the 'Content-Transfer-Encoding: {78}bit' header field
isn't telling you anything per se about the header since the
headers are predefined to be US-ASCII with the =???=
encoding providing an escape in case you want what's there
to be convertible to non-ASCII.

When upas/marshal says that a message (or message portion)
is either 7 or 8 bit, it's just stating a fact.  However, if
smtp sees an 8bit message and doesn't get an esmtp connection
to the remote host, it should encode the message (or message
part) in base64 (or quoted printable).

We either have to bite the bullet and encode all 8-bit data
presented to marshal OR change smtp to do the recoding OR
both.  However, if we're also willing to relay messages (which
I do) than the marshal change is insufficient since mail may
pass through us from an 8bit to a 7bit channel without passing
marshal.

Therefore, I'm going to make smtp (or a front end to it)
convert and you can all stop your whining.

However, I'm still perplexed as to what to put in the header
of a multipart message.  Does the transfer encoding specified
there pertain to the whole message or just to the

	nyah nyah, if you only had a MIME mailer you wouldn't see this

message that starts every multipart message?

[-- Attachment #2: Type: message/rfc822, Size: 2026 bytes --]

From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] mime
Date: Wed, 22 Nov 2000 13:12:38 0000
Message-ID: <20001122121028.38BD3199E1@mail.cse.psu.edu>

> What brain damaged piece of dog
> excrement program would throw away the 8th bit of every
> byte in today's world?

annoying thing is that you don't know what the 8th bit means until
you've parsed the Content-transfer-encoding header.  it would be nice
if we could convert the whole thing from utf initially, but some
people have a habit of sending latin1 which of course translates as
lots of broken utf runes (and presumably utf translates as broken
latin1 on many machines).

i don't think that the header is allowed 8 bit stuff no matter what.

is the idea that if we just send utf regardless, sooner or later
mailers will assume that 8bit chars in mail headers are utf?

i might hack up a version of marshal that conforms to the standards,
at least superficially.  it would be nice to be able to send mail that
people on other platforms could read. we're not so far away.

  rog.

             reply	other threads:[~2000-11-22 20:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-22 20:49 presotto [this message]
2000-11-22 21:26 ` Boyd Roberts
2000-11-23 10:18 ` Lyndon Nerenberg
  -- strict thread matches above, loose matches on Subject: below --
2000-11-23 12:21 rog
2000-11-23 19:49 ` Boyd Roberts
2000-11-22 21:13 presotto
2000-11-22 15:46 rog
2000-11-22 15:02 ` Boyd Roberts
2000-11-22 15:16   ` Nigel Roles
2000-11-22 23:28   ` Steve Kilbane
2000-11-22 22:37     ` Boyd Roberts
2000-11-22 15:07 ` Boyd Roberts
2000-11-22 15:19 forsyth
2000-11-22 15:23 ` Boyd Roberts
2000-11-22 20:30   ` Boyd Roberts
2000-11-22 13:12 rog
2000-11-22 14:21 ` Boyd Roberts
2000-11-21 19:37 presotto
2000-11-21 20:04 ` Boyd Roberts
2000-11-21 23:07   ` Steve Kilbane
2000-11-22 13:50     ` Boyd Roberts
2000-11-21 23:25 ` rob pike
2000-11-21 23:31   ` Boyd Roberts
2000-11-22 10:31     ` matt
2000-11-22 14:00       ` Boyd Roberts
2000-11-22 14:53   ` Boyd Roberts

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=20001122204959.D4FE0199F5@mail.cse.psu.edu \
    --to=presotto@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).