rack-mail_exception 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +5 -0
- data/.gitignore +22 -0
- data/LICENSE +20 -0
- data/README.rdoc +38 -0
- data/Rakefile +56 -0
- data/VERSION +1 -0
- data/lib/rack/mail_exception.rb +103 -0
- data/test/helper.rb +13 -0
- data/test/test_rack_mail_exception.rb +93 -0
- data/vendor/mail/.bundle/config +2 -0
- data/vendor/mail/CHANGELOG.rdoc +370 -0
- data/vendor/mail/Dependencies.txt +3 -0
- data/vendor/mail/Gemfile +17 -0
- data/vendor/mail/README.rdoc +572 -0
- data/vendor/mail/ROADMAP +92 -0
- data/vendor/mail/Rakefile +41 -0
- data/vendor/mail/TODO.rdoc +9 -0
- data/vendor/mail/lib/mail.rb +76 -0
- data/vendor/mail/lib/mail/attachments_list.rb +99 -0
- data/vendor/mail/lib/mail/body.rb +287 -0
- data/vendor/mail/lib/mail/configuration.rb +67 -0
- data/vendor/mail/lib/mail/core_extensions/blank.rb +26 -0
- data/vendor/mail/lib/mail/core_extensions/nil.rb +11 -0
- data/vendor/mail/lib/mail/core_extensions/string.rb +27 -0
- data/vendor/mail/lib/mail/elements.rb +14 -0
- data/vendor/mail/lib/mail/elements/address.rb +306 -0
- data/vendor/mail/lib/mail/elements/address_list.rb +74 -0
- data/vendor/mail/lib/mail/elements/content_disposition_element.rb +30 -0
- data/vendor/mail/lib/mail/elements/content_location_element.rb +25 -0
- data/vendor/mail/lib/mail/elements/content_transfer_encoding_element.rb +24 -0
- data/vendor/mail/lib/mail/elements/content_type_element.rb +35 -0
- data/vendor/mail/lib/mail/elements/date_time_element.rb +26 -0
- data/vendor/mail/lib/mail/elements/envelope_from_element.rb +34 -0
- data/vendor/mail/lib/mail/elements/message_ids_element.rb +29 -0
- data/vendor/mail/lib/mail/elements/mime_version_element.rb +26 -0
- data/vendor/mail/lib/mail/elements/phrase_list.rb +21 -0
- data/vendor/mail/lib/mail/elements/received_element.rb +30 -0
- data/vendor/mail/lib/mail/encodings.rb +258 -0
- data/vendor/mail/lib/mail/encodings/7bit.rb +31 -0
- data/vendor/mail/lib/mail/encodings/8bit.rb +31 -0
- data/vendor/mail/lib/mail/encodings/base64.rb +33 -0
- data/vendor/mail/lib/mail/encodings/binary.rb +31 -0
- data/vendor/mail/lib/mail/encodings/quoted_printable.rb +38 -0
- data/vendor/mail/lib/mail/encodings/transfer_encoding.rb +58 -0
- data/vendor/mail/lib/mail/envelope.rb +35 -0
- data/vendor/mail/lib/mail/field.rb +223 -0
- data/vendor/mail/lib/mail/field_list.rb +33 -0
- data/vendor/mail/lib/mail/fields.rb +35 -0
- data/vendor/mail/lib/mail/fields/bcc_field.rb +56 -0
- data/vendor/mail/lib/mail/fields/cc_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/comments_field.rb +41 -0
- data/vendor/mail/lib/mail/fields/common/address_container.rb +16 -0
- data/vendor/mail/lib/mail/fields/common/common_address.rb +125 -0
- data/vendor/mail/lib/mail/fields/common/common_date.rb +42 -0
- data/vendor/mail/lib/mail/fields/common/common_field.rb +50 -0
- data/vendor/mail/lib/mail/fields/common/common_message_id.rb +43 -0
- data/vendor/mail/lib/mail/fields/common/parameter_hash.rb +52 -0
- data/vendor/mail/lib/mail/fields/content_description_field.rb +19 -0
- data/vendor/mail/lib/mail/fields/content_disposition_field.rb +69 -0
- data/vendor/mail/lib/mail/fields/content_id_field.rb +63 -0
- data/vendor/mail/lib/mail/fields/content_location_field.rb +42 -0
- data/vendor/mail/lib/mail/fields/content_transfer_encoding_field.rb +50 -0
- data/vendor/mail/lib/mail/fields/content_type_field.rb +185 -0
- data/vendor/mail/lib/mail/fields/date_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/from_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/in_reply_to_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/keywords_field.rb +44 -0
- data/vendor/mail/lib/mail/fields/message_id_field.rb +83 -0
- data/vendor/mail/lib/mail/fields/mime_version_field.rb +53 -0
- data/vendor/mail/lib/mail/fields/optional_field.rb +13 -0
- data/vendor/mail/lib/mail/fields/received_field.rb +67 -0
- data/vendor/mail/lib/mail/fields/references_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/reply_to_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/resent_bcc_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/resent_cc_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/resent_date_field.rb +35 -0
- data/vendor/mail/lib/mail/fields/resent_from_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/resent_message_id_field.rb +34 -0
- data/vendor/mail/lib/mail/fields/resent_sender_field.rb +62 -0
- data/vendor/mail/lib/mail/fields/resent_to_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/return_path_field.rb +64 -0
- data/vendor/mail/lib/mail/fields/sender_field.rb +67 -0
- data/vendor/mail/lib/mail/fields/structured_field.rb +51 -0
- data/vendor/mail/lib/mail/fields/subject_field.rb +16 -0
- data/vendor/mail/lib/mail/fields/to_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/unstructured_field.rb +166 -0
- data/vendor/mail/lib/mail/header.rb +262 -0
- data/vendor/mail/lib/mail/mail.rb +234 -0
- data/vendor/mail/lib/mail/message.rb +1867 -0
- data/vendor/mail/lib/mail/network.rb +9 -0
- data/vendor/mail/lib/mail/network/delivery_methods/file_delivery.rb +40 -0
- data/vendor/mail/lib/mail/network/delivery_methods/sendmail.rb +62 -0
- data/vendor/mail/lib/mail/network/delivery_methods/smtp.rb +110 -0
- data/vendor/mail/lib/mail/network/delivery_methods/test_mailer.rb +40 -0
- data/vendor/mail/lib/mail/network/retriever_methods/imap.rb +18 -0
- data/vendor/mail/lib/mail/network/retriever_methods/pop3.rb +149 -0
- data/vendor/mail/lib/mail/parsers/address_lists.rb +64 -0
- data/vendor/mail/lib/mail/parsers/address_lists.treetop +19 -0
- data/vendor/mail/lib/mail/parsers/content_disposition.rb +387 -0
- data/vendor/mail/lib/mail/parsers/content_disposition.treetop +46 -0
- data/vendor/mail/lib/mail/parsers/content_location.rb +139 -0
- data/vendor/mail/lib/mail/parsers/content_location.treetop +20 -0
- data/vendor/mail/lib/mail/parsers/content_transfer_encoding.rb +162 -0
- data/vendor/mail/lib/mail/parsers/content_transfer_encoding.treetop +20 -0
- data/vendor/mail/lib/mail/parsers/content_type.rb +539 -0
- data/vendor/mail/lib/mail/parsers/content_type.treetop +58 -0
- data/vendor/mail/lib/mail/parsers/date_time.rb +114 -0
- data/vendor/mail/lib/mail/parsers/date_time.treetop +11 -0
- data/vendor/mail/lib/mail/parsers/envelope_from.rb +194 -0
- data/vendor/mail/lib/mail/parsers/envelope_from.treetop +32 -0
- data/vendor/mail/lib/mail/parsers/message_ids.rb +45 -0
- data/vendor/mail/lib/mail/parsers/message_ids.treetop +15 -0
- data/vendor/mail/lib/mail/parsers/mime_version.rb +144 -0
- data/vendor/mail/lib/mail/parsers/mime_version.treetop +19 -0
- data/vendor/mail/lib/mail/parsers/phrase_lists.rb +45 -0
- data/vendor/mail/lib/mail/parsers/phrase_lists.treetop +15 -0
- data/vendor/mail/lib/mail/parsers/received.rb +71 -0
- data/vendor/mail/lib/mail/parsers/received.treetop +11 -0
- data/vendor/mail/lib/mail/parsers/rfc2045.rb +464 -0
- data/vendor/mail/lib/mail/parsers/rfc2045.treetop +36 -0
- data/vendor/mail/lib/mail/parsers/rfc2822.rb +5318 -0
- data/vendor/mail/lib/mail/parsers/rfc2822.treetop +410 -0
- data/vendor/mail/lib/mail/parsers/rfc2822_obsolete.rb +3757 -0
- data/vendor/mail/lib/mail/parsers/rfc2822_obsolete.treetop +241 -0
- data/vendor/mail/lib/mail/part.rb +102 -0
- data/vendor/mail/lib/mail/parts_list.rb +34 -0
- data/vendor/mail/lib/mail/patterns.rb +30 -0
- data/vendor/mail/lib/mail/utilities.rb +181 -0
- data/vendor/mail/lib/mail/version.rb +10 -0
- data/vendor/mail/lib/mail/version_specific/ruby_1_8.rb +97 -0
- data/vendor/mail/lib/mail/version_specific/ruby_1_9.rb +87 -0
- data/vendor/mail/lib/tasks/corpus.rake +125 -0
- data/vendor/mail/lib/tasks/treetop.rake +10 -0
- data/vendor/mail/mail.gemspec +20 -0
- data/vendor/mail/reference/US ASCII Table.txt +130 -0
- data/vendor/mail/reference/rfc1035 Domain Implementation and Specification.txt +3083 -0
- data/vendor/mail/reference/rfc1049 Content-Type Header Field for Internet Messages.txt +451 -0
- data/vendor/mail/reference/rfc1344 Implications of MIME for Internet Mail Gateways.txt +586 -0
- data/vendor/mail/reference/rfc1345 Character Mnemonics & Character Sets.txt +5761 -0
- data/vendor/mail/reference/rfc1524 A User Agent Configuration Mechanism For Multimedia Mail Format Information.txt +675 -0
- data/vendor/mail/reference/rfc1652 SMTP Service Extension for 8bit-MIMEtransport.txt +339 -0
- data/vendor/mail/reference/rfc1892 Multipart Report .txt +227 -0
- data/vendor/mail/reference/rfc1893 Mail System Status Codes.txt +843 -0
- data/vendor/mail/reference/rfc2045 Multipurpose Internet Mail Extensions (1).txt +1739 -0
- data/vendor/mail/reference/rfc2046 Multipurpose Internet Mail Extensions (2).txt +2467 -0
- data/vendor/mail/reference/rfc2047 Multipurpose Internet Mail Extensions (3).txt +843 -0
- data/vendor/mail/reference/rfc2048 Multipurpose Internet Mail Extensions (4).txt +1180 -0
- data/vendor/mail/reference/rfc2049 Multipurpose Internet Mail Extensions (5).txt +1347 -0
- data/vendor/mail/reference/rfc2111 Content-ID and Message-ID URLs.txt +283 -0
- data/vendor/mail/reference/rfc2183 Content-Disposition Header Field.txt +675 -0
- data/vendor/mail/reference/rfc2231 MIME Parameter Value and Encoded Word Extensions.txt +563 -0
- data/vendor/mail/reference/rfc2387 MIME Multipart-Related Content-type.txt +563 -0
- data/vendor/mail/reference/rfc2821 Simple Mail Transfer Protocol.txt +3711 -0
- data/vendor/mail/reference/rfc2822 Internet Message Format.txt +2859 -0
- data/vendor/mail/reference/rfc3462 Reporting of Mail System Administrative Messages.txt +396 -0
- data/vendor/mail/reference/rfc3696 Checking and Transformation of Names.txt +898 -0
- data/vendor/mail/reference/rfc4155 The application-mbox Media Type.txt +502 -0
- data/vendor/mail/reference/rfc4234 Augmented BNF for Syntax Specifications: ABNF.txt +899 -0
- data/vendor/mail/reference/rfc822 Standard for the Format of ARPA Internet Text Messages.txt +2900 -0
- data/vendor/mail/spec/environment.rb +15 -0
- data/vendor/mail/spec/features/making_a_new_message.feature +14 -0
- data/vendor/mail/spec/features/steps/env.rb +6 -0
- data/vendor/mail/spec/features/steps/making_a_new_message_steps.rb +11 -0
- data/vendor/mail/spec/fixtures/attachments/basic_email.eml +31 -0
- data/vendor/mail/spec/fixtures/attachments/test.gif +0 -0
- data/vendor/mail/spec/fixtures/attachments/test.jpg +0 -0
- data/vendor/mail/spec/fixtures/attachments/test.pdf +0 -0
- data/vendor/mail/spec/fixtures/attachments/test.png +0 -0
- data/vendor/mail/spec/fixtures/attachments/test.tiff +0 -0
- data/vendor/mail/spec/fixtures/attachments/test.zip +0 -0
- data/vendor/mail/spec/fixtures/attachments//343/201/246/343/201/231/343/201/250.txt +2 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_content_disposition.eml +29 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_content_location.eml +32 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_message_rfc822.eml +92 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_only_email.eml +17 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_pdf.eml +70 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_with_encoded_name.eml +47 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_with_quoted_filename.eml +60 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/cant_parse_from.eml +33 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_7-bit.eml +231 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_empty.eml +33 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_plain.eml +148 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_qp_with_space.eml +53 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_spam.eml +44 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_text-html.eml +50 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_with_8bits.eml +770 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_with_semi_colon.eml +269 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_x_uuencode.eml +79 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/empty_group_lists.eml +162 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/header_fields_with_empty_values.eml +33 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/missing_body.eml +16 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/missing_content_disposition.eml +43 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/multiple_content_types.eml +25 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email11.eml +34 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email12.eml +32 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email2.eml +114 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email4.eml +59 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email7.eml +66 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_encoded_stack_level_too_deep.eml +53 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_illegal_boundary.eml +58 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_mimepart_without_content_type.eml +94 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_multipart_mixed_quoted_boundary.eml +50 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_nested_attachment.eml +100 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_quoted_illegal_boundary.eml +58 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/sig_only_email.eml +29 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/two_from_in_message.eml +42 -0
- data/vendor/mail/spec/fixtures/emails/multi_charset/japanese.eml +9 -0
- data/vendor/mail/spec/fixtures/emails/multi_charset/japanese_attachment.eml +27 -0
- data/vendor/mail/spec/fixtures/emails/multi_charset/japanese_attachment_long_name.eml +44 -0
- data/vendor/mail/spec/fixtures/emails/multipart_report_emails/multi_address_bounce1.eml +179 -0
- data/vendor/mail/spec/fixtures/emails/multipart_report_emails/multi_address_bounce2.eml +179 -0
- data/vendor/mail/spec/fixtures/emails/multipart_report_emails/report_422.eml +98 -0
- data/vendor/mail/spec/fixtures/emails/multipart_report_emails/report_530.eml +97 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/basic_email.eml +31 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email.eml +14 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email10.eml +20 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email5.eml +19 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email6.eml +20 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email8.eml +47 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_bad_time.eml +62 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_double_at_in_header.eml +14 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_incorrect_header.eml +28 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_multiple_from.eml +30 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_quoted_with_0d0a.eml +14 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_reply.eml +32 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_simple.eml +11 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_string_in_date_field.eml +17 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_trailing_dot.eml +21 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_with_bad_date.eml +48 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_with_partially_quoted_subject.eml +14 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example01.eml +8 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example02.eml +9 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example03.eml +7 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example04.eml +7 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example05.eml +8 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example06.eml +10 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example07.eml +9 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example08.eml +12 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example09.eml +15 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example10.eml +15 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example11.eml +6 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example12.eml +8 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example13.eml +10 -0
- data/vendor/mail/spec/fixtures/emails/sample_output_multipart +0 -0
- data/vendor/mail/spec/mail/attachments_list_spec.rb +214 -0
- data/vendor/mail/spec/mail/body_spec.rb +385 -0
- data/vendor/mail/spec/mail/configuration_spec.rb +19 -0
- data/vendor/mail/spec/mail/core_extensions/string_spec.rb +62 -0
- data/vendor/mail/spec/mail/core_extensions_spec.rb +99 -0
- data/vendor/mail/spec/mail/elements/address_list_spec.rb +109 -0
- data/vendor/mail/spec/mail/elements/address_spec.rb +609 -0
- data/vendor/mail/spec/mail/elements/date_time_element_spec.rb +20 -0
- data/vendor/mail/spec/mail/elements/envelope_from_element_spec.rb +31 -0
- data/vendor/mail/spec/mail/elements/message_ids_element_spec.rb +43 -0
- data/vendor/mail/spec/mail/elements/phrase_list_spec.rb +22 -0
- data/vendor/mail/spec/mail/elements/received_element_spec.rb +34 -0
- data/vendor/mail/spec/mail/encoding_spec.rb +189 -0
- data/vendor/mail/spec/mail/encodings/base64_spec.rb +25 -0
- data/vendor/mail/spec/mail/encodings/quoted_printable_spec.rb +25 -0
- data/vendor/mail/spec/mail/encodings_spec.rb +664 -0
- data/vendor/mail/spec/mail/example_emails_spec.rb +303 -0
- data/vendor/mail/spec/mail/field_list_spec.rb +33 -0
- data/vendor/mail/spec/mail/field_spec.rb +198 -0
- data/vendor/mail/spec/mail/fields/bcc_field_spec.rb +89 -0
- data/vendor/mail/spec/mail/fields/cc_field_spec.rb +79 -0
- data/vendor/mail/spec/mail/fields/comments_field_spec.rb +25 -0
- data/vendor/mail/spec/mail/fields/common/address_container_spec.rb +18 -0
- data/vendor/mail/spec/mail/fields/common/common_address_spec.rb +132 -0
- data/vendor/mail/spec/mail/fields/common/common_date_spec.rb +25 -0
- data/vendor/mail/spec/mail/fields/common/common_field_spec.rb +69 -0
- data/vendor/mail/spec/mail/fields/common/common_message_id_spec.rb +30 -0
- data/vendor/mail/spec/mail/fields/common/parameter_hash_spec.rb +56 -0
- data/vendor/mail/spec/mail/fields/content_description_field_spec.rb +39 -0
- data/vendor/mail/spec/mail/fields/content_disposition_field_spec.rb +55 -0
- data/vendor/mail/spec/mail/fields/content_id_field_spec.rb +117 -0
- data/vendor/mail/spec/mail/fields/content_location_field_spec.rb +46 -0
- data/vendor/mail/spec/mail/fields/content_transfer_encoding_field_spec.rb +113 -0
- data/vendor/mail/spec/mail/fields/content_type_field_spec.rb +678 -0
- data/vendor/mail/spec/mail/fields/date_field_spec.rb +73 -0
- data/vendor/mail/spec/mail/fields/envelope_spec.rb +48 -0
- data/vendor/mail/spec/mail/fields/from_field_spec.rb +89 -0
- data/vendor/mail/spec/mail/fields/in_reply_to_field_spec.rb +62 -0
- data/vendor/mail/spec/mail/fields/keywords_field_spec.rb +66 -0
- data/vendor/mail/spec/mail/fields/message_id_field_spec.rb +147 -0
- data/vendor/mail/spec/mail/fields/mime_version_field_spec.rb +166 -0
- data/vendor/mail/spec/mail/fields/received_field_spec.rb +44 -0
- data/vendor/mail/spec/mail/fields/references_field_spec.rb +35 -0
- data/vendor/mail/spec/mail/fields/reply_to_field_spec.rb +67 -0
- data/vendor/mail/spec/mail/fields/resent_bcc_field_spec.rb +66 -0
- data/vendor/mail/spec/mail/fields/resent_cc_field_spec.rb +66 -0
- data/vendor/mail/spec/mail/fields/resent_date_field_spec.rb +39 -0
- data/vendor/mail/spec/mail/fields/resent_from_field_spec.rb +66 -0
- data/vendor/mail/spec/mail/fields/resent_message_id_field_spec.rb +24 -0
- data/vendor/mail/spec/mail/fields/resent_sender_field_spec.rb +58 -0
- data/vendor/mail/spec/mail/fields/resent_to_field_spec.rb +66 -0
- data/vendor/mail/spec/mail/fields/return_path_field_spec.rb +52 -0
- data/vendor/mail/spec/mail/fields/sender_field_spec.rb +58 -0
- data/vendor/mail/spec/mail/fields/structured_field_spec.rb +72 -0
- data/vendor/mail/spec/mail/fields/to_field_spec.rb +92 -0
- data/vendor/mail/spec/mail/fields/unstructured_field_spec.rb +134 -0
- data/vendor/mail/spec/mail/header_spec.rb +578 -0
- data/vendor/mail/spec/mail/mail_spec.rb +34 -0
- data/vendor/mail/spec/mail/message_spec.rb +1409 -0
- data/vendor/mail/spec/mail/mime_messages_spec.rb +435 -0
- data/vendor/mail/spec/mail/multipart_report_spec.rb +112 -0
- data/vendor/mail/spec/mail/network/delivery_methods/file_delivery_spec.rb +79 -0
- data/vendor/mail/spec/mail/network/delivery_methods/sendmail_spec.rb +125 -0
- data/vendor/mail/spec/mail/network/delivery_methods/smtp_spec.rb +133 -0
- data/vendor/mail/spec/mail/network/delivery_methods/test_mailer_spec.rb +57 -0
- data/vendor/mail/spec/mail/network/retriever_methods/pop3_spec.rb +180 -0
- data/vendor/mail/spec/mail/network_spec.rb +359 -0
- data/vendor/mail/spec/mail/parsers/address_lists_parser_spec.rb +15 -0
- data/vendor/mail/spec/mail/parsers/content_transfer_encoding_parser_spec.rb +72 -0
- data/vendor/mail/spec/mail/part_spec.rb +129 -0
- data/vendor/mail/spec/mail/parts_list_spec.rb +12 -0
- data/vendor/mail/spec/mail/round_tripping_spec.rb +44 -0
- data/vendor/mail/spec/mail/utilities_spec.rb +327 -0
- data/vendor/mail/spec/mail/version_specific/escape_paren_1_8_spec.rb +32 -0
- data/vendor/mail/spec/matchers/break_down_to.rb +35 -0
- data/vendor/mail/spec/spec_helper.rb +163 -0
- metadata +442 -0
@@ -0,0 +1,451 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
Network Working Group M. Sirbu
|
8
|
+
Request for Comments: 1049 CMU
|
9
|
+
March 1988
|
10
|
+
|
11
|
+
A CONTENT-TYPE HEADER FIELD FOR INTERNET MESSAGES
|
12
|
+
|
13
|
+
STATUS OF THIS MEMO
|
14
|
+
|
15
|
+
This RFC suggests proposed additions to the Internet Mail Protocol,
|
16
|
+
RFC-822, for the Internet community, and requests discussion and
|
17
|
+
suggestions for improvements. Distribution of this memo is
|
18
|
+
unlimited.
|
19
|
+
|
20
|
+
ABSTRACT
|
21
|
+
|
22
|
+
A standardized Content-type field allows mail reading systems to
|
23
|
+
automatically identify the type of a structured message body and to
|
24
|
+
process it for display accordingly. The structured message body must
|
25
|
+
still conform to the RFC-822 requirements concerning allowable
|
26
|
+
characters. A mail reading system need not take any specific action
|
27
|
+
upon receiving a message with a valid Content-Type header field. The
|
28
|
+
ability to recognize this field and invoke the appropriate display
|
29
|
+
process accordingly will, however, improve the readability of
|
30
|
+
messages, and allow the exchange of messages containing mathematical
|
31
|
+
symbols, or foreign language characters.
|
32
|
+
|
33
|
+
Table of Contents
|
34
|
+
|
35
|
+
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 1
|
36
|
+
2. Problems with Structured Messages . . . . . . . . . . . . . . . 3
|
37
|
+
3. The Content-type Header Field . . . . . . . . . . . . . . . . . 5
|
38
|
+
3.1. Type Values . . . . . . . . . . . . . . . . . . . . . . 5
|
39
|
+
3.2. Version Number . . . . . . . . . . . . . . . . . . . . . 6
|
40
|
+
3.3. Resource Reference . . . . . . . . . . . . . . . . . . . 6
|
41
|
+
3.4. Comment. . . . . . . . . . . . . . . . . . . . . . . . . 7
|
42
|
+
4. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . 7
|
43
|
+
|
44
|
+
1. Introduction
|
45
|
+
|
46
|
+
As defined in RFC-822, [2], an electronic mail message consists of a
|
47
|
+
number of defined header fields, some containing structured
|
48
|
+
information (e.g., date, addresses), and a message body consisting of
|
49
|
+
an unstructured string of ASCII characters.
|
50
|
+
|
51
|
+
The success of the Internet mail system has led to a desire to use
|
52
|
+
the mail system for sending around information with a greater degree
|
53
|
+
of structure, while remaining within the constraints imposed by the
|
54
|
+
limited character set. A prime example is the use of mail to send a
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
Sirbu [Page 1]
|
59
|
+
|
60
|
+
RFC 1049 Mail Content Type March 1988
|
61
|
+
|
62
|
+
|
63
|
+
document with embedded TROFF formatting commands. A more
|
64
|
+
sophisticated example would be a message body encoded in a Page
|
65
|
+
Description Language (PDL) such as Postscript. In both cases, simply
|
66
|
+
mapping the ASCII characters to the screen or printer in the usual
|
67
|
+
fashion will not render the document image intended by the sender; an
|
68
|
+
additional processing step is required to produce an image of the
|
69
|
+
message text on a display device or a piece of paper.
|
70
|
+
|
71
|
+
In both of these examples, the message body contains only the legal
|
72
|
+
character set, but the content has a structure which produces some
|
73
|
+
desirable result after appropriate processing by the recipient. If a
|
74
|
+
message header field could be used to indicate the structuring
|
75
|
+
technique used in the message body, then a sophisticated mail system
|
76
|
+
could use such a field to automatically invoke the appropriate
|
77
|
+
processing of the message body. For example, a header field which
|
78
|
+
indicated that the message body was encoded using Postscript could be
|
79
|
+
used to direct a mail system running under Sun Microsystem's NEWS
|
80
|
+
window manager to process the Postscript to produce the appropriate
|
81
|
+
page image on the screen.
|
82
|
+
|
83
|
+
Private header fields (beginning with "X-") are already being used by
|
84
|
+
some systems to affect such a result (e.g., the Andrew Message System
|
85
|
+
developed at Carnegie Mellon University). However, the widespread
|
86
|
+
use of such techniques will require general agreement on the name and
|
87
|
+
allowed parameter values for a header field to be used for this
|
88
|
+
purpose.
|
89
|
+
|
90
|
+
We propose that a new header field, "Content-type:" be recognized as
|
91
|
+
the standard field for indicating the structure of the message body.
|
92
|
+
The contents of the "Content-Type:" field are parameters which
|
93
|
+
specify what type of structure is used in the message body.
|
94
|
+
|
95
|
+
Note that we are not proposing that the message body contain anything
|
96
|
+
other than ASCII characters as specified in RFC-822. Whatever
|
97
|
+
structuring is contained in the message body must be represented
|
98
|
+
using only the allowed ASCII characters. Thus, this proposal should
|
99
|
+
have no impact on existing mailers, only on mail reading systems.
|
100
|
+
|
101
|
+
At the same time, this restriction eliminates the use of more general
|
102
|
+
structuring techniques such as Abstract Syntax Notation, (CCITT
|
103
|
+
Recommendation X.409) as used in the X.400 messaging standard, which
|
104
|
+
are octet-oriented.
|
105
|
+
|
106
|
+
This is not the first proposal for structuring message bodies.
|
107
|
+
RFC-767 discusses a proposed technique for structuring multi-media
|
108
|
+
mail messages. We are also aware that many users already employ mail
|
109
|
+
to send TROFF, SCRIBE, TEX, Postscript or other structured
|
110
|
+
information. Such postprocessing as is required must be invoked
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
Sirbu [Page 2]
|
115
|
+
|
116
|
+
RFC 1049 Mail Content Type March 1988
|
117
|
+
|
118
|
+
|
119
|
+
manually by the message recipient who looks at the message text
|
120
|
+
displayed as conventional ASCII and recognizes that it is structured
|
121
|
+
in some way that requires additional processing to be properly
|
122
|
+
rendered. Our proposal is designed to facilitate automatic
|
123
|
+
processing of messages by a mail reading system.
|
124
|
+
|
125
|
+
2. Problems with Structured Messages
|
126
|
+
|
127
|
+
Once we introduce the notion that a message body might require some
|
128
|
+
processing other than simply painting the characters to the screen we
|
129
|
+
raise a number of fundamental questions. These generally arise due
|
130
|
+
to the certainty that some receiving systems will have the facilities
|
131
|
+
to process the received message and some will not. The problem is
|
132
|
+
what to do in the presence of systems with different levels of
|
133
|
+
capability.
|
134
|
+
|
135
|
+
First, we must recognize that the purpose of structured messages is
|
136
|
+
to be able to send types of information, ultimately intended for
|
137
|
+
human consumption, not expressable in plain ASCII. Thus, there is no
|
138
|
+
way in plain ASCII to send the italics, boldface, or greek characters
|
139
|
+
that can be expressed in Postscript. If some different processing is
|
140
|
+
necessary to render these glyphs, then that is the minimum price to
|
141
|
+
be paid in order to send them at all.
|
142
|
+
|
143
|
+
Second, by insisting that the message body contain only ASCII, we
|
144
|
+
insure that it will not "break" current mail reading systems which
|
145
|
+
are not equipped to process the structure; the result on the screen
|
146
|
+
may not be readily interpretable by the human reader, however.
|
147
|
+
|
148
|
+
If a message sender knows that the recipient cannot process
|
149
|
+
Postscript, he or she may prefer that the message be revised to
|
150
|
+
eliminate the use of italics and boldface, rather than appear
|
151
|
+
incomprehensible. If Postscript is being used because the message
|
152
|
+
contains passages in Greek, there may be no suitable ASCII
|
153
|
+
equivalent, however.
|
154
|
+
|
155
|
+
Ideally, the details of structuring the message (or not) to conform
|
156
|
+
to the capabilities of the recipient system could be completely
|
157
|
+
hidden from the message sender. The distributed Internet mail system
|
158
|
+
would somehow determine the capabilities of the recipient system, and
|
159
|
+
convert the message automatically; or, if there was no way to send
|
160
|
+
Greek text in ASCII, inform the sender that his message could not be
|
161
|
+
transmitted.
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
Sirbu [Page 3]
|
171
|
+
|
172
|
+
RFC 1049 Mail Content Type March 1988
|
173
|
+
|
174
|
+
|
175
|
+
In practice, this is a difficult task. There are three possible
|
176
|
+
approaches:
|
177
|
+
|
178
|
+
1. Each mail system maintains a database of capabilities of
|
179
|
+
remote systems it knows how to send to. Such a database
|
180
|
+
would be very difficult to keep up to date.
|
181
|
+
|
182
|
+
2. The mail transport service negotiates with the receiving
|
183
|
+
system as to its capabilities. If the receiving system
|
184
|
+
cannot support the specified content type, the mail is
|
185
|
+
transformed into conventional ASCII before transmission.
|
186
|
+
This would require changes to all existing SMTP
|
187
|
+
implementations, and could not be implemented in the case
|
188
|
+
where RFC-822 type messages are being forwarded via Bitnet or
|
189
|
+
other networks which do not implement SMTP.
|
190
|
+
|
191
|
+
3. An expanded directory service maintains information on mail
|
192
|
+
processing capabilities of receiving hosts. This eliminates
|
193
|
+
the need for real-time negotiation with the final
|
194
|
+
destination, but still requires direct interaction with the
|
195
|
+
directory service. Since directory querying is part of mail
|
196
|
+
sending as opposed to mail composing/reading systems, this
|
197
|
+
requires changes to existing mailers as well as a major
|
198
|
+
change to the domain name directory service.
|
199
|
+
|
200
|
+
We note in passing that the X.400 protocol implements approach number
|
201
|
+
2, and that the Draft Recommendations for X.DS, the Directory
|
202
|
+
Service, would support option 3.
|
203
|
+
|
204
|
+
In the interest of facilitating early usage of structured messages,
|
205
|
+
we choose not to recommend any of the three approaches described
|
206
|
+
above at the present time. In a forthcoming RFC we will propose a
|
207
|
+
solution based on option 2, requiring modification to mailers to
|
208
|
+
support negotiation over capabilities. For the present, then, users
|
209
|
+
would be obliged to keep their own private list of capabilities of
|
210
|
+
recipients and to take care that they do not send Postscript, TROFF
|
211
|
+
or other structured messages to recipients who cannot process them.
|
212
|
+
The penalty for failure to do so will be the frustration of the
|
213
|
+
recipient in trying to read a raw Postscript or TROFF file painted on
|
214
|
+
his or her screen. Some System Administrators may attempt to
|
215
|
+
implement option 1 for the benefit of their users, but this does not
|
216
|
+
impose a requirement for changes on any other mail system.
|
217
|
+
|
218
|
+
We recognize that the long-term solution must require changes to
|
219
|
+
mailers. However, in order to begin now to standardize the header
|
220
|
+
fields, and to facilitate experimentation, we issue the present RFC.
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
Sirbu [Page 4]
|
227
|
+
|
228
|
+
RFC 1049 Mail Content Type March 1988
|
229
|
+
|
230
|
+
|
231
|
+
3. The Content-type Header Field
|
232
|
+
|
233
|
+
Whatever structuring technique is specified by the Content-type
|
234
|
+
field, it must be known precisely to both the sender and the
|
235
|
+
recipient of the message in order for the message to be properly
|
236
|
+
interpreted. In general, this means that the allowed parameter
|
237
|
+
values for the Content-type: field must identify a well-defined,
|
238
|
+
standardized, document structuring technique. We do not preclude,
|
239
|
+
however, the use of a Content-type: parameter value to specify a
|
240
|
+
private structuring technique known only to the sender and the
|
241
|
+
recipient.
|
242
|
+
|
243
|
+
More precisely, we propose that the Content-type: header field
|
244
|
+
consist of up to four parameter values. The first, or type parameter
|
245
|
+
names the structuring technique; the second, optional, parameter is a
|
246
|
+
version number, ver-num, which indicates a particular version or
|
247
|
+
revision of the standardized structuring technique. The third
|
248
|
+
parameter is a resource reference, resource-ref, which may indicate a
|
249
|
+
standard database of information to be used in interpreting the
|
250
|
+
structured document. The last parameter is a comment.
|
251
|
+
|
252
|
+
In the Extended Backus Naur Form of RFC-822, we have:
|
253
|
+
|
254
|
+
Content-Type:= type [";" ver-num [";" 1#resource-ref]] [comment]
|
255
|
+
|
256
|
+
3.1. Type Values
|
257
|
+
|
258
|
+
Initially, the type parameter would be limited to the following set
|
259
|
+
of values:
|
260
|
+
|
261
|
+
type:= "POSTSCRIPT"/"SCRIBE"/"SGML"/"TEX"/"TROFF"/
|
262
|
+
"DVI"/"X-"atom
|
263
|
+
|
264
|
+
These values are not case sensitive. POSTSCRIPT, Postscript, and
|
265
|
+
POStscriPT are all equivalent.
|
266
|
+
|
267
|
+
POSTSCRIPT Indicates the enclosed document consists of
|
268
|
+
information encoded using the Postscript Page
|
269
|
+
Definition Language developed by Adobe Systems,
|
270
|
+
Inc. [1]
|
271
|
+
|
272
|
+
SCRIBE Indicates the document contains embedded formatting
|
273
|
+
information according to the syntax used by the
|
274
|
+
Scribe document formatting language distributed by
|
275
|
+
the Unilogic Corporation. [6]
|
276
|
+
|
277
|
+
SGML Indicates the document contains structuring
|
278
|
+
information to according the rules specified for
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
Sirbu [Page 5]
|
283
|
+
|
284
|
+
RFC 1049 Mail Content Type March 1988
|
285
|
+
|
286
|
+
|
287
|
+
the Standard Generalized Markup Language, IS 8879,
|
288
|
+
as published by the International Organization for
|
289
|
+
Standardization. [3] Documents structured according
|
290
|
+
to the ISO DIS 8613--Office Docment Architecture and
|
291
|
+
Interchange Format--may also be encoded using SGML
|
292
|
+
syntax.
|
293
|
+
|
294
|
+
TEX Indicates the document contains embedded formatting
|
295
|
+
information according to the syntax of the TEX
|
296
|
+
document production language. [4]
|
297
|
+
|
298
|
+
TROFF Indicates the document contains embedded formatting
|
299
|
+
information according to the syntax specified for the
|
300
|
+
TROFF formatting package developed by AT&T Bell
|
301
|
+
Laboratories. [5]
|
302
|
+
|
303
|
+
DVI Indicates the document contains information according
|
304
|
+
to the device independent file format produced by
|
305
|
+
TROFF or TEX.
|
306
|
+
|
307
|
+
"X-"atom Any type value beginning with the characters "X-" is
|
308
|
+
a private value.
|
309
|
+
|
310
|
+
3.2. Version Number
|
311
|
+
|
312
|
+
Since standard structuring techniques in fact evolve over time, we
|
313
|
+
leave room for specifying a version number for the content type.
|
314
|
+
Valid values will depend upon the type parameter.
|
315
|
+
|
316
|
+
ver-num:= local-part
|
317
|
+
|
318
|
+
In particular, we have the following valid values:
|
319
|
+
|
320
|
+
For type=POSTSCRIPT
|
321
|
+
|
322
|
+
ver-num:= "1.0"/"2.0"/"null"
|
323
|
+
|
324
|
+
For type=SCRIBE
|
325
|
+
|
326
|
+
ver-num:= "3"/"4"/"5"/"null"
|
327
|
+
|
328
|
+
For type=SGML
|
329
|
+
|
330
|
+
ver-num:="IS.8879.1986"/"null"
|
331
|
+
|
332
|
+
3.3. Resource Reference
|
333
|
+
|
334
|
+
resource-ref:= local-part
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
Sirbu [Page 6]
|
339
|
+
|
340
|
+
RFC 1049 Mail Content Type March 1988
|
341
|
+
|
342
|
+
|
343
|
+
As Apple has demonstrated with their implementation of the
|
344
|
+
Laserwriter, a very general document structuring technique can be
|
345
|
+
made more efficient by defining a set of macros or other similar
|
346
|
+
resources to be used in interpreting any transmitted stream. The
|
347
|
+
Macintosh transmits a LaserPrep file to the Laserwriter containing
|
348
|
+
font and macro definitions which can be called upon by subsequent
|
349
|
+
documents. The result is that documents as sent to the Laserwriter
|
350
|
+
are considerably more compact than if they had to include the
|
351
|
+
LaserPrep file each time. The Resource Reference parameter allows
|
352
|
+
specification of a well known resource, such as a LaserPrep file,
|
353
|
+
which should be used by the receiving system when processing the
|
354
|
+
message.
|
355
|
+
|
356
|
+
Resource references could also include macro packages for use with
|
357
|
+
TEX or references to preprocessors such as eqn and tbl for use with
|
358
|
+
troff. Allowed values will vary according to the type parameter.
|
359
|
+
|
360
|
+
In particular, we propose the following values:
|
361
|
+
|
362
|
+
For type = POSTSCRIPT
|
363
|
+
|
364
|
+
resource-ref:= "laserprep2.9"/"laserprep3.0"/"laserprep3.1"/
|
365
|
+
"laserprep4.0"/local-part
|
366
|
+
|
367
|
+
For type = TROFF
|
368
|
+
|
369
|
+
resource-ref:= "eqn"/"tbl"/"me"/local-part
|
370
|
+
|
371
|
+
3.4. Comment
|
372
|
+
|
373
|
+
The comment field can be any additional comment text the user
|
374
|
+
desires. Comments are enclosed in parentheses as specified in
|
375
|
+
RFC-822.
|
376
|
+
|
377
|
+
4. Conclusion
|
378
|
+
|
379
|
+
A standardized Content-type field allows mail reading systems to
|
380
|
+
automatically identify the type of a structured message body and to
|
381
|
+
process it for display accordingly. The strcutured message body must
|
382
|
+
still conform to the RFC-822 requirements concerning allowable
|
383
|
+
characters. A mail reading system need not take any specific action
|
384
|
+
upon receiving a message with valid Content-Type header field. The
|
385
|
+
ability to recognize this field and invoke the appropriate display
|
386
|
+
process accordingly will, however, improve the readability of
|
387
|
+
messages, and allow the exchange of messages containing mathematical
|
388
|
+
symbols, or foreign language characters.
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
Sirbu [Page 7]
|
395
|
+
|
396
|
+
RFC 1049 Mail Content Type March 1988
|
397
|
+
|
398
|
+
|
399
|
+
In the near term, the major use of a Content-Type: header field is
|
400
|
+
likely to be for designating the message body as containing a Page
|
401
|
+
Definition Language representation such as Postscript.
|
402
|
+
|
403
|
+
Additional type values shall be registered with Internet Assigned
|
404
|
+
Numbers Coordinator at USC-ISI. Please contact:
|
405
|
+
|
406
|
+
Joyce K. Reynolds
|
407
|
+
USC Information Sciences Institute
|
408
|
+
4676 Admiralty Way
|
409
|
+
Marina del Rey, CA 90292-6695
|
410
|
+
|
411
|
+
213-822-1511 JKReynolds@ISI.EDU
|
412
|
+
|
413
|
+
REFERENCES
|
414
|
+
|
415
|
+
1. Adobe Systems, Inc. Postscript Language Reference Manual.
|
416
|
+
Addison-Wesley, Reading, Mass., 1985.
|
417
|
+
|
418
|
+
2. Crocker, David H. RFC-822: Standard for the Format of ARPA
|
419
|
+
Internet Text Messages. Network Information Center,
|
420
|
+
August 13, 1982.
|
421
|
+
|
422
|
+
3. ISO TC97/SC18. Standard Generalized Markup Language.
|
423
|
+
Tech. Rept. DIS 8879, ISO, 1986.
|
424
|
+
|
425
|
+
4. Knuth, Donald E. The TEXbook. Addison-Wesley, Reading, Mass.,
|
426
|
+
1984.
|
427
|
+
|
428
|
+
5. Ossanna, Joseph F. NROFF/TROFF User's Manual. Bell
|
429
|
+
Laboratories, Murray Hill, New Jersey, 1976. Computing Science
|
430
|
+
Technical Report No.54.
|
431
|
+
|
432
|
+
6. Unilogic. SCRIBE Document Production Software. Unilogic, 1985.
|
433
|
+
Fourth Edition.
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
Sirbu [Page 8]
|
451
|
+
|
@@ -0,0 +1,586 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
Network Working Group N. Borenstein, Bellcore
|
8
|
+
Request for Comments: 1344 June 1992
|
9
|
+
|
10
|
+
Implications of MIME for Internet Mail Gateways
|
11
|
+
|
12
|
+
|
13
|
+
Status of This Memo
|
14
|
+
|
15
|
+
This is an informational memo for the Internet community,
|
16
|
+
and requests discussion and suggestions for improvements.
|
17
|
+
This memo does not specify an Internet standard.
|
18
|
+
Distribution of this memo is unlimited.
|
19
|
+
|
20
|
+
Abstract
|
21
|
+
|
22
|
+
The recent development of MIME (Multipurpose Internet Mail
|
23
|
+
Extensions) offers a wide range of new opportunities for
|
24
|
+
electronic mail system systems. Most of these opportunites
|
25
|
+
are relevant only to user agents, the programs that interact
|
26
|
+
with human users when they send and receive mail. However,
|
27
|
+
some opportunities are also opened up for mail transport
|
28
|
+
systems. While MIME was carefully designed so that it does
|
29
|
+
not require any changes to Internet electronic message
|
30
|
+
transport facilities, there are several ways in which
|
31
|
+
message transport systems may want to take advantage of
|
32
|
+
MIME. These opportunities are the subject of this memo.
|
33
|
+
|
34
|
+
Background -- The MIME Format
|
35
|
+
|
36
|
+
Recently, a new standardized format has been defined for
|
37
|
+
enhanced electronic mail messages on the Internet. This
|
38
|
+
format, known as MIME, permits messages to include, in a
|
39
|
+
standardized manner, non-ASCII text, images, audio, and a
|
40
|
+
variety of other kinds of interesting data.
|
41
|
+
|
42
|
+
The MIME effort was explicitly focused on requiring
|
43
|
+
absolutely no changes at the message transport level.
|
44
|
+
Because of this fact, MIME-format mail runs transparently on
|
45
|
+
all known Internet or Internet-style mail systems. This
|
46
|
+
means that those concerned solely with the maintenance and
|
47
|
+
development of message transport services can safely ignore
|
48
|
+
MIME completely, if they so choose.
|
49
|
+
|
50
|
+
However, the fact that MIME can be ignored, for the purpose
|
51
|
+
of message transport, does not necessarily mean that it
|
52
|
+
should be ignored. In particular, MIME offers several
|
53
|
+
features that should be of interest to those responsible for
|
54
|
+
message transport services. By exploiting these features,
|
55
|
+
transport systems can provide certain additional kinds of
|
56
|
+
service that are currently unavailable, and can alleviate a
|
57
|
+
few existing problems.
|
58
|
+
|
59
|
+
The remainder of this document is an attempt to briefly
|
60
|
+
point out and summarize some important ways in which MIME
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
Borenstein [Page 1]
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
RFC 1344 MIME and Mail Gateways June 1992
|
70
|
+
|
71
|
+
|
72
|
+
may be of use for message transport systems. This document
|
73
|
+
makes no attempt to present a complete technical description
|
74
|
+
of MIME, however. For that, the reader is refered to the
|
75
|
+
MIME document itself [RFC-1341].
|
76
|
+
|
77
|
+
Mail Transport and Gateway Services: A Key Distinction
|
78
|
+
|
79
|
+
Before implementing any of the mechanisms discussed in this
|
80
|
+
memo, one should be familiar with the distinction between
|
81
|
+
mail transport service and mail gateway service. Basically,
|
82
|
+
mail transport software is responsible for moving a message
|
83
|
+
within a homogeneous electronic mail service network. Mail
|
84
|
+
gateways, on the other hand, exchange mail between two
|
85
|
+
significantly different mail environments, including via
|
86
|
+
non-electronic services, such as postal mail.
|
87
|
+
|
88
|
+
In general, it is widely considered unacceptable for mail
|
89
|
+
transport services to alter the contents of messages. In
|
90
|
+
the case of mail gateways, however, such alteration is often
|
91
|
+
inevitable. Thus, strictly speaking, many of the mechanisms
|
92
|
+
described here apply only to gateways, and should not be
|
93
|
+
used in simple mail transport systems. However, it is
|
94
|
+
possible that some very special situations -- e.g., an SMTP
|
95
|
+
relay that transports mail across extremely expensive
|
96
|
+
intercontinental network links -- might need to modify
|
97
|
+
messages, in order to provide appropriate service for those
|
98
|
+
situations, and hence must redefine its role to be that of a
|
99
|
+
gateway.
|
100
|
+
|
101
|
+
In this memo, it is assumed that transformations which alter
|
102
|
+
a message's contents will be performed only by gateways, but
|
103
|
+
it is recognized that some existing mail transport agents
|
104
|
+
may choose to reclassify themselves as gateways in order to
|
105
|
+
perform the functions described here.
|
106
|
+
|
107
|
+
Rejected Messages
|
108
|
+
|
109
|
+
An unfortunately frequent duty of message transport services
|
110
|
+
is the rejection of mail to the sender. This may happen
|
111
|
+
because the mail was undeliverable, or because it did not
|
112
|
+
conform to the requirements of a gateway (e.g., it was too
|
113
|
+
large).
|
114
|
+
|
115
|
+
There has never been a standard format for rejected messages
|
116
|
+
in the past. This has been an annoyance, but not a major
|
117
|
+
problem for text messages. For non-text messages, however,
|
118
|
+
the lack of a standard rejection format is more crucial,
|
119
|
+
because rejected messages typically appear to be text, and
|
120
|
+
the user who finds himself viewing images or audio as if
|
121
|
+
they were text is rarely happy with the result.
|
122
|
+
|
123
|
+
MIME makes it very easy to encapsulate messages in such a
|
124
|
+
way that their semantics are completely preserved. The
|
125
|
+
simplest way to do this is to make each rejection notice a
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
Borenstein [Page 2]
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
RFC 1344 MIME and Mail Gateways June 1992
|
135
|
+
|
136
|
+
|
137
|
+
MIME "multipart/mixed" message. That multipart message
|
138
|
+
would contain two parts, a text part explaining the reason
|
139
|
+
for the rejection, and an encapsulated message part that
|
140
|
+
contained the rejected message itself.
|
141
|
+
|
142
|
+
It should be stressed that the transport software does not
|
143
|
+
need to understand the structure of the rejected message at
|
144
|
+
all. It merely needs to encapsulate it properly. The
|
145
|
+
following, for example, shows how any MIME message may be
|
146
|
+
encapsulated in a rejection message in such a way that all
|
147
|
+
information will be immediately visible in the correct form
|
148
|
+
if the recipient reads it with a MIME-conformant mail
|
149
|
+
reader:
|
150
|
+
|
151
|
+
From: Mailer-Daemon <daemon@somewhere.com>
|
152
|
+
Subject: Rejected Message
|
153
|
+
Content-type: multipart/mixed; boundary=unique-boundary
|
154
|
+
|
155
|
+
--unique-boundary
|
156
|
+
Content-type: text/plain; charset=us-ascii
|
157
|
+
|
158
|
+
A mail message you sent was rejected. The details of
|
159
|
+
the rejected message are as follows:
|
160
|
+
|
161
|
+
From: Nathainel Borenstein <nsb@bellcore.com>
|
162
|
+
Message-ID: <12345@bellcore.com>
|
163
|
+
To: bush@whitehouse.gov
|
164
|
+
Subject: I know my rights!
|
165
|
+
Rejection-reason: No mail from libertarians is
|
166
|
+
accepted.
|
167
|
+
|
168
|
+
The original message follows below.
|
169
|
+
--unique-boundary
|
170
|
+
Content-type: message/rfc822
|
171
|
+
|
172
|
+
The ENTIRE REJECTED MESSAGE, starting with the headers,
|
173
|
+
goes here.
|
174
|
+
|
175
|
+
--unique-boundary--
|
176
|
+
In the above example, the ONLY thing that is not
|
177
|
+
'boilerplate" is the choice of boundary string. The phrase
|
178
|
+
"unique-boundary" should be replaced by a string that does
|
179
|
+
not appear (prefixed by two hyphens) in any of the body
|
180
|
+
parts.
|
181
|
+
|
182
|
+
Encapsulating a message in this manner is very easily done,
|
183
|
+
and will constitute a significant service that message
|
184
|
+
transport services can perform for MIME users.
|
185
|
+
|
186
|
+
IMPORTANT NOTE: The format given above is simply one of
|
187
|
+
many possible ways to format a rejection message using MIME.
|
188
|
+
Independent IETF efforts are needed in order to standardize
|
189
|
+
the format of rejections and acknowledgements.
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
Borenstein [Page 3]
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
RFC 1344 MIME and Mail Gateways June 1992
|
200
|
+
|
201
|
+
|
202
|
+
Fragmenting and Reassembling Large Messages
|
203
|
+
|
204
|
+
One problem that occurs with increasing frequency in
|
205
|
+
Internet mail is the rejection of messages because of size
|
206
|
+
limitations. This problem can be expected to grow
|
207
|
+
substantially more severe with the acceptance of MIME, as
|
208
|
+
MIME invites the use of very large objects such as images
|
209
|
+
and audio clips. Fortunately, MIME also provides mechanisms
|
210
|
+
that can help alleviate the problem.
|
211
|
+
|
212
|
+
One particularly relevant MIME type is "message/partial",
|
213
|
+
which can be used for the automatic fragmentation and
|
214
|
+
reassembly of large mail messages. The message/partial type
|
215
|
+
can be handled entirely at the user agent level, but message
|
216
|
+
transport services can also make use of this type to provide
|
217
|
+
more intelligent behavior at gateways.
|
218
|
+
|
219
|
+
In particular, when gatewaying mail to or from a system or
|
220
|
+
network known to enforce size limitations that are more or
|
221
|
+
less stringent than are enforced locally, message transport
|
222
|
+
services might choose either to break a large message into
|
223
|
+
fragments, or (perhaps less likely) to reassemble fragments
|
224
|
+
into a larger message. The combination of these two
|
225
|
+
behaviors can make the overall Internet mail environment
|
226
|
+
appear more complete and seamless than it actually is.
|
227
|
+
|
228
|
+
Details on the message/partial format may be found in the
|
229
|
+
MIME document. What follows is an example of how a simple
|
230
|
+
short message might be broken into two message/partial
|
231
|
+
messages. In practice, of course, the message/partial
|
232
|
+
facility would only be likely to be used for much longer
|
233
|
+
messages.
|
234
|
+
|
235
|
+
The following initial message:
|
236
|
+
|
237
|
+
From: Nathaniel Borenstein <nsb@bellcore.com>
|
238
|
+
To: Ned Freed: <ned@innosoft.com>
|
239
|
+
Subject: a test message
|
240
|
+
Content-type: image/gif
|
241
|
+
Content-Transfer-Encoding: base64
|
242
|
+
|
243
|
+
R0lGODdhQAGMAbMAAAAAAP/u7swzIu6ZiLsiEd1EM+5VRGaI3WYAAO67qkRV
|
244
|
+
uwARd6q7/ywAAAAAQAGMAUME/hDISau9OOvNu/9gKI6kRJwoUa5s675wLM90l
|
245
|
+
XW5YKxqPyKRygxv2dr4czwlMCZrQLFTYHBJ2hlyQYFiaz+i0WWBou7fOq1x8vXWfU
|
246
|
+
qU1fJ2qEhYaHGjhZQmJ2QT1xBW1ak1xUdV0/VjtsbpUEDaEJCQOIpqeoNV+LXo5W
|
247
|
+
fVN3dZKceAQPvgyhwQ2lqcXGxx5wja59eJIGUNCszF90sYp50CoqFZ4DoqMMo6M
|
248
|
+
|
249
|
+
can be transformed, invertibly, into the following two
|
250
|
+
message/partial messages:
|
251
|
+
|
252
|
+
|
253
|
+
From: Nathaniel Borenstein <nsb@bellcore.com>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
Borenstein [Page 4]
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
RFC 1344 MIME and Mail Gateways June 1992
|
265
|
+
|
266
|
+
|
267
|
+
To: Ned Freed <ned@innosoft.com>
|
268
|
+
Subject: a test message
|
269
|
+
Content-type: message/partial; id="xyx@host.com";
|
270
|
+
number=1; total=2
|
271
|
+
|
272
|
+
Content-type: image/gif
|
273
|
+
Content-Transfer-Encoding: base64
|
274
|
+
|
275
|
+
R0lGODdhQAGMAbMAAAAAAP/u7swzIu6ZiLsiEd1EM+5VRGaI3WYAAO67qkRV
|
276
|
+
|
277
|
+
and
|
278
|
+
|
279
|
+
From: Nathaniel Borenstein <nsb@bellcore.com>
|
280
|
+
To: Ned Freed <ned@innosoft.com>
|
281
|
+
Subject: a test message
|
282
|
+
Content-type: message/partial; id="xyx@host.com";
|
283
|
+
number=2; total=2
|
284
|
+
|
285
|
+
uwARd6q7/ywAAAAAQAGMAUME/hDISau9OOvNu/9gKI6kRJwoUa5s675wLM90l
|
286
|
+
XW5YKxqPyKRygxv2dr4czwlMCZrQLFTYHBJ2hlyQYFiaz+i0WWBou7fOq1x8vXWfU
|
287
|
+
qU1fJ2qEhYaHGjhZQmJ2QT1xBW1ak1xUdV0/VjtsbpUEDaEJCQOIpqeoNV+LXo5W
|
288
|
+
fVN3dZKceAQPvgyhwQ2lqcXGxx5wja59eJIGUNCszF90sYp50CoqFZ4DoqMMo6M
|
289
|
+
|
290
|
+
Fragmenting such messages rather than rejecting them might
|
291
|
+
be a reasonable option for some gateway services, at least
|
292
|
+
for a certain range of message sizes. Of course, it is
|
293
|
+
often difficult for a gateway to know what size limitations
|
294
|
+
will be encountered "downstream", but intelligent guesses
|
295
|
+
are often possible. Moreover, an IETF working group on SMTP
|
296
|
+
extensions has proposed augmenting SMTP with a "SIZE" verb
|
297
|
+
that would facilitate this process, thereby possibly
|
298
|
+
requiring fragmentation on the fly during message
|
299
|
+
transmission.
|
300
|
+
|
301
|
+
Note also that fragmentation or reassembly might reasonably
|
302
|
+
be performed, in differing circumstances, by either the
|
303
|
+
sending or receiving gateway systems, depending on which
|
304
|
+
system knew more about the capabilities of the other.
|
305
|
+
|
306
|
+
Using or Removing External-Body Pointers
|
307
|
+
|
308
|
+
Another MIME type oriented to extremely large messages is
|
309
|
+
the "message/external-body" type. In this type of message,
|
310
|
+
all or part of the body data is not included in the actual
|
311
|
+
message itself. Instead, the Content-Type header field
|
312
|
+
includes information that tells how the body data can be
|
313
|
+
retrieved -- either via a file system, via anonymous ftp, or
|
314
|
+
via other mechanisms.
|
315
|
+
|
316
|
+
The message/external-body type provides a new option for
|
317
|
+
mail transport services that wishes to optimize the way
|
318
|
+
bandwidth resources are used in a given environment. For
|
319
|
+
example, the basic use of message/external-body is to reduce
|
320
|
+
bandwidth in email traffic. However, when email crosses a
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
Borenstein [Page 5]
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
RFC 1344 MIME and Mail Gateways June 1992
|
330
|
+
|
331
|
+
|
332
|
+
slow and expensive boundary -- e.g., a satellite link across
|
333
|
+
the Pacific -- it might make sense to retrieve the data
|
334
|
+
itself and transform the external-body reference into the
|
335
|
+
actual data. Alternately, it might make sense to copy the
|
336
|
+
data itself to a new location, closer to the message
|
337
|
+
recipients, and change the location pointed to in the
|
338
|
+
message. Because the external-body specification can
|
339
|
+
include an expiration date, message transport services can
|
340
|
+
trade off storage and bandwidth capabilities to try to
|
341
|
+
optimize the overall use of resources for very large
|
342
|
+
messages.
|
343
|
+
|
344
|
+
Such behaviors by a gateway require careful analysis of
|
345
|
+
cost/benefit tradeoffs and would be a dramatic departure
|
346
|
+
from typical mail transport services. However, the
|
347
|
+
potential benefits are quite significant, so that such the
|
348
|
+
appropriate use of these service options should be explored.
|
349
|
+
|
350
|
+
For example, the following message includes PostScript data
|
351
|
+
by external reference:
|
352
|
+
|
353
|
+
From: Nathaniel Borenstein <nsb@bellcore.com>
|
354
|
+
To: Ned Freed <ned@innosoft.com>
|
355
|
+
Subject: The latest MIME draft
|
356
|
+
Content-Type: message/external-body;
|
357
|
+
name="BodyFormats.ps";
|
358
|
+
site="thumper.bellcore.com";
|
359
|
+
access-type=ANON-FTP;
|
360
|
+
directory="pub";
|
361
|
+
mode="image";
|
362
|
+
expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"
|
363
|
+
|
364
|
+
Content-type: application/postscript
|
365
|
+
|
366
|
+
A gateway to Australia might choose to copy the file to an
|
367
|
+
Australian FTP archive, changing the relevant parameters on
|
368
|
+
the Content-type header field. Alternately, it might choose
|
369
|
+
simply to transform the message into one in which all the
|
370
|
+
data were included:
|
371
|
+
|
372
|
+
From: Nathaniel Borenstein <nsb@bellcore.com>
|
373
|
+
To: Ned Freed <ned@innosoft.com>
|
374
|
+
Subject: The latest MIME draft
|
375
|
+
Content-type: application/postscript
|
376
|
+
|
377
|
+
%!PS-Adobe-1.0
|
378
|
+
%%Creator: greenbush:nsb (Nathaniel Borenstein,MRE 2A-
|
379
|
+
274,4270,9938586,21462)
|
380
|
+
etc...
|
381
|
+
|
382
|
+
This is an example which suggests both the benefits and the
|
383
|
+
dangers. There is considerable benefit to having a copy of
|
384
|
+
the data immediately available, but there also may be
|
385
|
+
considerable expense involved in transporting it to all of
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
Borenstein [Page 6]
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
RFC 1344 MIME and Mail Gateways June 1992
|
395
|
+
|
396
|
+
|
397
|
+
a the members of a list, if only a few will use the data
|
398
|
+
anytime soon.
|
399
|
+
|
400
|
+
Alternatively, instead of replacing an external-body message
|
401
|
+
with its real contents, it might make sense to transform it
|
402
|
+
into a "multipart/alternative" message containing both the
|
403
|
+
external body reference and the expanded version. This
|
404
|
+
means that only the external body part can be forwarded if
|
405
|
+
desired, and the recipient doesn't lose the information as
|
406
|
+
to where the data was fetched from, if they want to fetch an
|
407
|
+
up-to-date version in the future. Such information could be
|
408
|
+
represented, in MIME, in the following form:
|
409
|
+
|
410
|
+
From: Nathaniel Borenstein <nsb@bellcore.com>
|
411
|
+
To: Ned Freed <ned@innosoft.com>
|
412
|
+
Subject: The latest MIME draft
|
413
|
+
Content-type: multipart/alternative; boundary=foo
|
414
|
+
|
415
|
+
--foo
|
416
|
+
Content-Type: message/external-body;
|
417
|
+
name="BodyFormats.ps";
|
418
|
+
site="thumper.bellcore.com";
|
419
|
+
access-type=ANON-FTP;
|
420
|
+
directory="pub";
|
421
|
+
mode="image";
|
422
|
+
expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"
|
423
|
+
|
424
|
+
Content-type: application/postscript
|
425
|
+
--foo
|
426
|
+
Content-type: application/postscript
|
427
|
+
|
428
|
+
%!PS-Adobe-1.0
|
429
|
+
%%Creator: greenbush:nsb (Nathaniel Borenstein,MRE 2A-
|
430
|
+
274,4270,9938586,21462)
|
431
|
+
etc...
|
432
|
+
--foo--
|
433
|
+
|
434
|
+
Similarly for the case where a message is copied to a local
|
435
|
+
FTP site, one could offer two external body parts as the
|
436
|
+
alternatives, allowing the user agent to choose which FTP
|
437
|
+
site is preferred.
|
438
|
+
|
439
|
+
Image and other Format Conversions
|
440
|
+
|
441
|
+
MIME currently defines two image formats, image/gif and
|
442
|
+
image/jpeg. The former is much more convenient for many
|
443
|
+
users, and can be displayed more quickly on many systems.
|
444
|
+
The latter is a much more compact representation, and
|
445
|
+
therfore places less stress on mail transport facilities.
|
446
|
+
|
447
|
+
Message transport services can optimize both transport
|
448
|
+
bandwidth and user convenience by intelligent translation
|
449
|
+
between these formats (and other formats that might be added
|
450
|
+
later). When a message of type image/gif is submitted for
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
Borenstein [Page 7]
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
RFC 1344 MIME and Mail Gateways June 1992
|
460
|
+
|
461
|
+
|
462
|
+
long-haul delivery, it might reasonably be translated to
|
463
|
+
image/jpeg. Conversely, when image/jpeg data is received
|
464
|
+
for final delivery on a system with adequate storage
|
465
|
+
resources, it might be translated to image/gif for the
|
466
|
+
convenience of the recipient. Software to perform these
|
467
|
+
translations is widely available. It should be noted,
|
468
|
+
however, that performance of such conversions presumes
|
469
|
+
support for the new format by the recipient.
|
470
|
+
|
471
|
+
Although MIME currently only defines one audio format, more
|
472
|
+
are likely to be defined and registered with IANA in the
|
473
|
+
future. In that case, similar format conversion facilities
|
474
|
+
might be appropriate for audio.
|
475
|
+
|
476
|
+
If format conversion is done, it is STRONGLY RECOMMENDED
|
477
|
+
that some kind of trace information (probably in the form of
|
478
|
+
a Received header field) should be added to a message to
|
479
|
+
document the conversion that has been performed.
|
480
|
+
|
481
|
+
Some people have expressed concerns, or even the opinion
|
482
|
+
that conversions should never be done. To accomodate the
|
483
|
+
desires of those who dislike the idea of automatic format
|
484
|
+
conversion. For this reason, it is suggested that such
|
485
|
+
transformations be generally restricted to gateways rather
|
486
|
+
than general message transport services, and that services
|
487
|
+
which perform such conversions should be sensitive to a
|
488
|
+
header field that indicates that the sender does not wish to
|
489
|
+
have any such conversions performed. A suggested value for
|
490
|
+
this header field is:
|
491
|
+
|
492
|
+
Content-Conversion: prohibited
|
493
|
+
|
494
|
+
User agents that wish to explicitly indicate a willingness
|
495
|
+
for such conversions to be performed may use:
|
496
|
+
|
497
|
+
Content-Conversion: permitted
|
498
|
+
|
499
|
+
However, this will be the default assumption of many
|
500
|
+
gateways, so this header field is not strictly necessary.
|
501
|
+
It also should be noted that such control of conversion
|
502
|
+
would only be available to the sender, rather than to any of
|
503
|
+
the recipients.
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
Borenstein [Page 8]
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
RFC 1344 MIME and Mail Gateways June 1992
|
525
|
+
|
526
|
+
|
527
|
+
Robust Encoding of Data
|
528
|
+
|
529
|
+
In addition to all the reasons given above for possible
|
530
|
+
transformation of body data, it will sometimes be the case
|
531
|
+
that a gateway can tell that the body data, as given, will
|
532
|
+
not robustly survive the next step of transport. For
|
533
|
+
example, mail crossing an ASCII-to-EBCDIC gateway will lose
|
534
|
+
information if certain characters are used. In such cases,
|
535
|
+
a gateway can make the data more robust simply by applying
|
536
|
+
one of the MIME Content-Transfer-Encoding algorithms (base64
|
537
|
+
or quoted-printable) to the body or body part. This will
|
538
|
+
generally be a loss-less transformation, but care must be
|
539
|
+
taken to ensure that the resulting message is MIME-
|
540
|
+
conformant if the inital message was not. (For example, a
|
541
|
+
MIME-Version header field may need to be added.)
|
542
|
+
|
543
|
+
User-oriented concerns
|
544
|
+
|
545
|
+
If a gateway is going to perform major transformations on a
|
546
|
+
mail message, such as translating image formats or mapping
|
547
|
+
between included data and external-reference data, it seems
|
548
|
+
inevitable that there will be situations in which users will
|
549
|
+
object to these transformations. This is, in large part, an
|
550
|
+
implementation issue, but it seems advisable, wherever
|
551
|
+
possible, to provide a mechanism whereby users can specify,
|
552
|
+
to the transport system, whether or not they want such
|
553
|
+
services performed automatically on their behalf. The use of
|
554
|
+
the "Content-Conversion" header field, as mentioned above,
|
555
|
+
is suggested for this purpose, since it it least provides
|
556
|
+
some control by the sender, if not the recipient.
|
557
|
+
|
558
|
+
References
|
559
|
+
|
560
|
+
[RFC-1341] Borenstein, N., and N. Freed, "MIME
|
561
|
+
(Multipurpose Internet Mail Extensions): Mechanisms for
|
562
|
+
Specifying and Describing the Format of Internet Message
|
563
|
+
Bodies", RFC 1341, Bellcore, June, 1992.
|
564
|
+
|
565
|
+
Security Considerations
|
566
|
+
|
567
|
+
Security issues are not discussed in this memo.
|
568
|
+
|
569
|
+
Author's Address
|
570
|
+
|
571
|
+
Nathaniel S. Borenstein
|
572
|
+
MRE 2D-296, Bellcore
|
573
|
+
445 South St.
|
574
|
+
Morristown, NJ 07962-1910
|
575
|
+
|
576
|
+
Email: nsb@bellcore.com
|
577
|
+
Phone: +1 201 829 4270
|
578
|
+
Fax: +1 201 829 7019
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
Borenstein [Page 9]
|
585
|
+
|
586
|
+
|