rack-mail_exception 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (321) hide show
  1. data/.document +5 -0
  2. data/.gitignore +22 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +38 -0
  5. data/Rakefile +56 -0
  6. data/VERSION +1 -0
  7. data/lib/rack/mail_exception.rb +103 -0
  8. data/test/helper.rb +13 -0
  9. data/test/test_rack_mail_exception.rb +93 -0
  10. data/vendor/mail/.bundle/config +2 -0
  11. data/vendor/mail/CHANGELOG.rdoc +370 -0
  12. data/vendor/mail/Dependencies.txt +3 -0
  13. data/vendor/mail/Gemfile +17 -0
  14. data/vendor/mail/README.rdoc +572 -0
  15. data/vendor/mail/ROADMAP +92 -0
  16. data/vendor/mail/Rakefile +41 -0
  17. data/vendor/mail/TODO.rdoc +9 -0
  18. data/vendor/mail/lib/mail.rb +76 -0
  19. data/vendor/mail/lib/mail/attachments_list.rb +99 -0
  20. data/vendor/mail/lib/mail/body.rb +287 -0
  21. data/vendor/mail/lib/mail/configuration.rb +67 -0
  22. data/vendor/mail/lib/mail/core_extensions/blank.rb +26 -0
  23. data/vendor/mail/lib/mail/core_extensions/nil.rb +11 -0
  24. data/vendor/mail/lib/mail/core_extensions/string.rb +27 -0
  25. data/vendor/mail/lib/mail/elements.rb +14 -0
  26. data/vendor/mail/lib/mail/elements/address.rb +306 -0
  27. data/vendor/mail/lib/mail/elements/address_list.rb +74 -0
  28. data/vendor/mail/lib/mail/elements/content_disposition_element.rb +30 -0
  29. data/vendor/mail/lib/mail/elements/content_location_element.rb +25 -0
  30. data/vendor/mail/lib/mail/elements/content_transfer_encoding_element.rb +24 -0
  31. data/vendor/mail/lib/mail/elements/content_type_element.rb +35 -0
  32. data/vendor/mail/lib/mail/elements/date_time_element.rb +26 -0
  33. data/vendor/mail/lib/mail/elements/envelope_from_element.rb +34 -0
  34. data/vendor/mail/lib/mail/elements/message_ids_element.rb +29 -0
  35. data/vendor/mail/lib/mail/elements/mime_version_element.rb +26 -0
  36. data/vendor/mail/lib/mail/elements/phrase_list.rb +21 -0
  37. data/vendor/mail/lib/mail/elements/received_element.rb +30 -0
  38. data/vendor/mail/lib/mail/encodings.rb +258 -0
  39. data/vendor/mail/lib/mail/encodings/7bit.rb +31 -0
  40. data/vendor/mail/lib/mail/encodings/8bit.rb +31 -0
  41. data/vendor/mail/lib/mail/encodings/base64.rb +33 -0
  42. data/vendor/mail/lib/mail/encodings/binary.rb +31 -0
  43. data/vendor/mail/lib/mail/encodings/quoted_printable.rb +38 -0
  44. data/vendor/mail/lib/mail/encodings/transfer_encoding.rb +58 -0
  45. data/vendor/mail/lib/mail/envelope.rb +35 -0
  46. data/vendor/mail/lib/mail/field.rb +223 -0
  47. data/vendor/mail/lib/mail/field_list.rb +33 -0
  48. data/vendor/mail/lib/mail/fields.rb +35 -0
  49. data/vendor/mail/lib/mail/fields/bcc_field.rb +56 -0
  50. data/vendor/mail/lib/mail/fields/cc_field.rb +55 -0
  51. data/vendor/mail/lib/mail/fields/comments_field.rb +41 -0
  52. data/vendor/mail/lib/mail/fields/common/address_container.rb +16 -0
  53. data/vendor/mail/lib/mail/fields/common/common_address.rb +125 -0
  54. data/vendor/mail/lib/mail/fields/common/common_date.rb +42 -0
  55. data/vendor/mail/lib/mail/fields/common/common_field.rb +50 -0
  56. data/vendor/mail/lib/mail/fields/common/common_message_id.rb +43 -0
  57. data/vendor/mail/lib/mail/fields/common/parameter_hash.rb +52 -0
  58. data/vendor/mail/lib/mail/fields/content_description_field.rb +19 -0
  59. data/vendor/mail/lib/mail/fields/content_disposition_field.rb +69 -0
  60. data/vendor/mail/lib/mail/fields/content_id_field.rb +63 -0
  61. data/vendor/mail/lib/mail/fields/content_location_field.rb +42 -0
  62. data/vendor/mail/lib/mail/fields/content_transfer_encoding_field.rb +50 -0
  63. data/vendor/mail/lib/mail/fields/content_type_field.rb +185 -0
  64. data/vendor/mail/lib/mail/fields/date_field.rb +55 -0
  65. data/vendor/mail/lib/mail/fields/from_field.rb +55 -0
  66. data/vendor/mail/lib/mail/fields/in_reply_to_field.rb +55 -0
  67. data/vendor/mail/lib/mail/fields/keywords_field.rb +44 -0
  68. data/vendor/mail/lib/mail/fields/message_id_field.rb +83 -0
  69. data/vendor/mail/lib/mail/fields/mime_version_field.rb +53 -0
  70. data/vendor/mail/lib/mail/fields/optional_field.rb +13 -0
  71. data/vendor/mail/lib/mail/fields/received_field.rb +67 -0
  72. data/vendor/mail/lib/mail/fields/references_field.rb +55 -0
  73. data/vendor/mail/lib/mail/fields/reply_to_field.rb +55 -0
  74. data/vendor/mail/lib/mail/fields/resent_bcc_field.rb +55 -0
  75. data/vendor/mail/lib/mail/fields/resent_cc_field.rb +55 -0
  76. data/vendor/mail/lib/mail/fields/resent_date_field.rb +35 -0
  77. data/vendor/mail/lib/mail/fields/resent_from_field.rb +55 -0
  78. data/vendor/mail/lib/mail/fields/resent_message_id_field.rb +34 -0
  79. data/vendor/mail/lib/mail/fields/resent_sender_field.rb +62 -0
  80. data/vendor/mail/lib/mail/fields/resent_to_field.rb +55 -0
  81. data/vendor/mail/lib/mail/fields/return_path_field.rb +64 -0
  82. data/vendor/mail/lib/mail/fields/sender_field.rb +67 -0
  83. data/vendor/mail/lib/mail/fields/structured_field.rb +51 -0
  84. data/vendor/mail/lib/mail/fields/subject_field.rb +16 -0
  85. data/vendor/mail/lib/mail/fields/to_field.rb +55 -0
  86. data/vendor/mail/lib/mail/fields/unstructured_field.rb +166 -0
  87. data/vendor/mail/lib/mail/header.rb +262 -0
  88. data/vendor/mail/lib/mail/mail.rb +234 -0
  89. data/vendor/mail/lib/mail/message.rb +1867 -0
  90. data/vendor/mail/lib/mail/network.rb +9 -0
  91. data/vendor/mail/lib/mail/network/delivery_methods/file_delivery.rb +40 -0
  92. data/vendor/mail/lib/mail/network/delivery_methods/sendmail.rb +62 -0
  93. data/vendor/mail/lib/mail/network/delivery_methods/smtp.rb +110 -0
  94. data/vendor/mail/lib/mail/network/delivery_methods/test_mailer.rb +40 -0
  95. data/vendor/mail/lib/mail/network/retriever_methods/imap.rb +18 -0
  96. data/vendor/mail/lib/mail/network/retriever_methods/pop3.rb +149 -0
  97. data/vendor/mail/lib/mail/parsers/address_lists.rb +64 -0
  98. data/vendor/mail/lib/mail/parsers/address_lists.treetop +19 -0
  99. data/vendor/mail/lib/mail/parsers/content_disposition.rb +387 -0
  100. data/vendor/mail/lib/mail/parsers/content_disposition.treetop +46 -0
  101. data/vendor/mail/lib/mail/parsers/content_location.rb +139 -0
  102. data/vendor/mail/lib/mail/parsers/content_location.treetop +20 -0
  103. data/vendor/mail/lib/mail/parsers/content_transfer_encoding.rb +162 -0
  104. data/vendor/mail/lib/mail/parsers/content_transfer_encoding.treetop +20 -0
  105. data/vendor/mail/lib/mail/parsers/content_type.rb +539 -0
  106. data/vendor/mail/lib/mail/parsers/content_type.treetop +58 -0
  107. data/vendor/mail/lib/mail/parsers/date_time.rb +114 -0
  108. data/vendor/mail/lib/mail/parsers/date_time.treetop +11 -0
  109. data/vendor/mail/lib/mail/parsers/envelope_from.rb +194 -0
  110. data/vendor/mail/lib/mail/parsers/envelope_from.treetop +32 -0
  111. data/vendor/mail/lib/mail/parsers/message_ids.rb +45 -0
  112. data/vendor/mail/lib/mail/parsers/message_ids.treetop +15 -0
  113. data/vendor/mail/lib/mail/parsers/mime_version.rb +144 -0
  114. data/vendor/mail/lib/mail/parsers/mime_version.treetop +19 -0
  115. data/vendor/mail/lib/mail/parsers/phrase_lists.rb +45 -0
  116. data/vendor/mail/lib/mail/parsers/phrase_lists.treetop +15 -0
  117. data/vendor/mail/lib/mail/parsers/received.rb +71 -0
  118. data/vendor/mail/lib/mail/parsers/received.treetop +11 -0
  119. data/vendor/mail/lib/mail/parsers/rfc2045.rb +464 -0
  120. data/vendor/mail/lib/mail/parsers/rfc2045.treetop +36 -0
  121. data/vendor/mail/lib/mail/parsers/rfc2822.rb +5318 -0
  122. data/vendor/mail/lib/mail/parsers/rfc2822.treetop +410 -0
  123. data/vendor/mail/lib/mail/parsers/rfc2822_obsolete.rb +3757 -0
  124. data/vendor/mail/lib/mail/parsers/rfc2822_obsolete.treetop +241 -0
  125. data/vendor/mail/lib/mail/part.rb +102 -0
  126. data/vendor/mail/lib/mail/parts_list.rb +34 -0
  127. data/vendor/mail/lib/mail/patterns.rb +30 -0
  128. data/vendor/mail/lib/mail/utilities.rb +181 -0
  129. data/vendor/mail/lib/mail/version.rb +10 -0
  130. data/vendor/mail/lib/mail/version_specific/ruby_1_8.rb +97 -0
  131. data/vendor/mail/lib/mail/version_specific/ruby_1_9.rb +87 -0
  132. data/vendor/mail/lib/tasks/corpus.rake +125 -0
  133. data/vendor/mail/lib/tasks/treetop.rake +10 -0
  134. data/vendor/mail/mail.gemspec +20 -0
  135. data/vendor/mail/reference/US ASCII Table.txt +130 -0
  136. data/vendor/mail/reference/rfc1035 Domain Implementation and Specification.txt +3083 -0
  137. data/vendor/mail/reference/rfc1049 Content-Type Header Field for Internet Messages.txt +451 -0
  138. data/vendor/mail/reference/rfc1344 Implications of MIME for Internet Mail Gateways.txt +586 -0
  139. data/vendor/mail/reference/rfc1345 Character Mnemonics & Character Sets.txt +5761 -0
  140. data/vendor/mail/reference/rfc1524 A User Agent Configuration Mechanism For Multimedia Mail Format Information.txt +675 -0
  141. data/vendor/mail/reference/rfc1652 SMTP Service Extension for 8bit-MIMEtransport.txt +339 -0
  142. data/vendor/mail/reference/rfc1892 Multipart Report .txt +227 -0
  143. data/vendor/mail/reference/rfc1893 Mail System Status Codes.txt +843 -0
  144. data/vendor/mail/reference/rfc2045 Multipurpose Internet Mail Extensions (1).txt +1739 -0
  145. data/vendor/mail/reference/rfc2046 Multipurpose Internet Mail Extensions (2).txt +2467 -0
  146. data/vendor/mail/reference/rfc2047 Multipurpose Internet Mail Extensions (3).txt +843 -0
  147. data/vendor/mail/reference/rfc2048 Multipurpose Internet Mail Extensions (4).txt +1180 -0
  148. data/vendor/mail/reference/rfc2049 Multipurpose Internet Mail Extensions (5).txt +1347 -0
  149. data/vendor/mail/reference/rfc2111 Content-ID and Message-ID URLs.txt +283 -0
  150. data/vendor/mail/reference/rfc2183 Content-Disposition Header Field.txt +675 -0
  151. data/vendor/mail/reference/rfc2231 MIME Parameter Value and Encoded Word Extensions.txt +563 -0
  152. data/vendor/mail/reference/rfc2387 MIME Multipart-Related Content-type.txt +563 -0
  153. data/vendor/mail/reference/rfc2821 Simple Mail Transfer Protocol.txt +3711 -0
  154. data/vendor/mail/reference/rfc2822 Internet Message Format.txt +2859 -0
  155. data/vendor/mail/reference/rfc3462 Reporting of Mail System Administrative Messages.txt +396 -0
  156. data/vendor/mail/reference/rfc3696 Checking and Transformation of Names.txt +898 -0
  157. data/vendor/mail/reference/rfc4155 The application-mbox Media Type.txt +502 -0
  158. data/vendor/mail/reference/rfc4234 Augmented BNF for Syntax Specifications: ABNF.txt +899 -0
  159. data/vendor/mail/reference/rfc822 Standard for the Format of ARPA Internet Text Messages.txt +2900 -0
  160. data/vendor/mail/spec/environment.rb +15 -0
  161. data/vendor/mail/spec/features/making_a_new_message.feature +14 -0
  162. data/vendor/mail/spec/features/steps/env.rb +6 -0
  163. data/vendor/mail/spec/features/steps/making_a_new_message_steps.rb +11 -0
  164. data/vendor/mail/spec/fixtures/attachments/basic_email.eml +31 -0
  165. data/vendor/mail/spec/fixtures/attachments/test.gif +0 -0
  166. data/vendor/mail/spec/fixtures/attachments/test.jpg +0 -0
  167. data/vendor/mail/spec/fixtures/attachments/test.pdf +0 -0
  168. data/vendor/mail/spec/fixtures/attachments/test.png +0 -0
  169. data/vendor/mail/spec/fixtures/attachments/test.tiff +0 -0
  170. data/vendor/mail/spec/fixtures/attachments/test.zip +0 -0
  171. data/vendor/mail/spec/fixtures/attachments//343/201/246/343/201/231/343/201/250.txt +2 -0
  172. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_content_disposition.eml +29 -0
  173. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_content_location.eml +32 -0
  174. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_message_rfc822.eml +92 -0
  175. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_only_email.eml +17 -0
  176. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_pdf.eml +70 -0
  177. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_with_encoded_name.eml +47 -0
  178. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_with_quoted_filename.eml +60 -0
  179. data/vendor/mail/spec/fixtures/emails/error_emails/cant_parse_from.eml +33 -0
  180. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_7-bit.eml +231 -0
  181. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_empty.eml +33 -0
  182. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_plain.eml +148 -0
  183. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_qp_with_space.eml +53 -0
  184. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_spam.eml +44 -0
  185. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_text-html.eml +50 -0
  186. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_with_8bits.eml +770 -0
  187. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_with_semi_colon.eml +269 -0
  188. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_x_uuencode.eml +79 -0
  189. data/vendor/mail/spec/fixtures/emails/error_emails/empty_group_lists.eml +162 -0
  190. data/vendor/mail/spec/fixtures/emails/error_emails/header_fields_with_empty_values.eml +33 -0
  191. data/vendor/mail/spec/fixtures/emails/error_emails/missing_body.eml +16 -0
  192. data/vendor/mail/spec/fixtures/emails/error_emails/missing_content_disposition.eml +43 -0
  193. data/vendor/mail/spec/fixtures/emails/error_emails/multiple_content_types.eml +25 -0
  194. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email11.eml +34 -0
  195. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email12.eml +32 -0
  196. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email2.eml +114 -0
  197. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email4.eml +59 -0
  198. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email7.eml +66 -0
  199. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_encoded_stack_level_too_deep.eml +53 -0
  200. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_illegal_boundary.eml +58 -0
  201. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_mimepart_without_content_type.eml +94 -0
  202. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_multipart_mixed_quoted_boundary.eml +50 -0
  203. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_nested_attachment.eml +100 -0
  204. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_quoted_illegal_boundary.eml +58 -0
  205. data/vendor/mail/spec/fixtures/emails/mime_emails/sig_only_email.eml +29 -0
  206. data/vendor/mail/spec/fixtures/emails/mime_emails/two_from_in_message.eml +42 -0
  207. data/vendor/mail/spec/fixtures/emails/multi_charset/japanese.eml +9 -0
  208. data/vendor/mail/spec/fixtures/emails/multi_charset/japanese_attachment.eml +27 -0
  209. data/vendor/mail/spec/fixtures/emails/multi_charset/japanese_attachment_long_name.eml +44 -0
  210. data/vendor/mail/spec/fixtures/emails/multipart_report_emails/multi_address_bounce1.eml +179 -0
  211. data/vendor/mail/spec/fixtures/emails/multipart_report_emails/multi_address_bounce2.eml +179 -0
  212. data/vendor/mail/spec/fixtures/emails/multipart_report_emails/report_422.eml +98 -0
  213. data/vendor/mail/spec/fixtures/emails/multipart_report_emails/report_530.eml +97 -0
  214. data/vendor/mail/spec/fixtures/emails/plain_emails/basic_email.eml +31 -0
  215. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email.eml +14 -0
  216. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email10.eml +20 -0
  217. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email5.eml +19 -0
  218. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email6.eml +20 -0
  219. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email8.eml +47 -0
  220. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_bad_time.eml +62 -0
  221. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_double_at_in_header.eml +14 -0
  222. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_incorrect_header.eml +28 -0
  223. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_multiple_from.eml +30 -0
  224. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_quoted_with_0d0a.eml +14 -0
  225. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_reply.eml +32 -0
  226. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_simple.eml +11 -0
  227. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_string_in_date_field.eml +17 -0
  228. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_trailing_dot.eml +21 -0
  229. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_with_bad_date.eml +48 -0
  230. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_with_partially_quoted_subject.eml +14 -0
  231. data/vendor/mail/spec/fixtures/emails/rfc2822/example01.eml +8 -0
  232. data/vendor/mail/spec/fixtures/emails/rfc2822/example02.eml +9 -0
  233. data/vendor/mail/spec/fixtures/emails/rfc2822/example03.eml +7 -0
  234. data/vendor/mail/spec/fixtures/emails/rfc2822/example04.eml +7 -0
  235. data/vendor/mail/spec/fixtures/emails/rfc2822/example05.eml +8 -0
  236. data/vendor/mail/spec/fixtures/emails/rfc2822/example06.eml +10 -0
  237. data/vendor/mail/spec/fixtures/emails/rfc2822/example07.eml +9 -0
  238. data/vendor/mail/spec/fixtures/emails/rfc2822/example08.eml +12 -0
  239. data/vendor/mail/spec/fixtures/emails/rfc2822/example09.eml +15 -0
  240. data/vendor/mail/spec/fixtures/emails/rfc2822/example10.eml +15 -0
  241. data/vendor/mail/spec/fixtures/emails/rfc2822/example11.eml +6 -0
  242. data/vendor/mail/spec/fixtures/emails/rfc2822/example12.eml +8 -0
  243. data/vendor/mail/spec/fixtures/emails/rfc2822/example13.eml +10 -0
  244. data/vendor/mail/spec/fixtures/emails/sample_output_multipart +0 -0
  245. data/vendor/mail/spec/mail/attachments_list_spec.rb +214 -0
  246. data/vendor/mail/spec/mail/body_spec.rb +385 -0
  247. data/vendor/mail/spec/mail/configuration_spec.rb +19 -0
  248. data/vendor/mail/spec/mail/core_extensions/string_spec.rb +62 -0
  249. data/vendor/mail/spec/mail/core_extensions_spec.rb +99 -0
  250. data/vendor/mail/spec/mail/elements/address_list_spec.rb +109 -0
  251. data/vendor/mail/spec/mail/elements/address_spec.rb +609 -0
  252. data/vendor/mail/spec/mail/elements/date_time_element_spec.rb +20 -0
  253. data/vendor/mail/spec/mail/elements/envelope_from_element_spec.rb +31 -0
  254. data/vendor/mail/spec/mail/elements/message_ids_element_spec.rb +43 -0
  255. data/vendor/mail/spec/mail/elements/phrase_list_spec.rb +22 -0
  256. data/vendor/mail/spec/mail/elements/received_element_spec.rb +34 -0
  257. data/vendor/mail/spec/mail/encoding_spec.rb +189 -0
  258. data/vendor/mail/spec/mail/encodings/base64_spec.rb +25 -0
  259. data/vendor/mail/spec/mail/encodings/quoted_printable_spec.rb +25 -0
  260. data/vendor/mail/spec/mail/encodings_spec.rb +664 -0
  261. data/vendor/mail/spec/mail/example_emails_spec.rb +303 -0
  262. data/vendor/mail/spec/mail/field_list_spec.rb +33 -0
  263. data/vendor/mail/spec/mail/field_spec.rb +198 -0
  264. data/vendor/mail/spec/mail/fields/bcc_field_spec.rb +89 -0
  265. data/vendor/mail/spec/mail/fields/cc_field_spec.rb +79 -0
  266. data/vendor/mail/spec/mail/fields/comments_field_spec.rb +25 -0
  267. data/vendor/mail/spec/mail/fields/common/address_container_spec.rb +18 -0
  268. data/vendor/mail/spec/mail/fields/common/common_address_spec.rb +132 -0
  269. data/vendor/mail/spec/mail/fields/common/common_date_spec.rb +25 -0
  270. data/vendor/mail/spec/mail/fields/common/common_field_spec.rb +69 -0
  271. data/vendor/mail/spec/mail/fields/common/common_message_id_spec.rb +30 -0
  272. data/vendor/mail/spec/mail/fields/common/parameter_hash_spec.rb +56 -0
  273. data/vendor/mail/spec/mail/fields/content_description_field_spec.rb +39 -0
  274. data/vendor/mail/spec/mail/fields/content_disposition_field_spec.rb +55 -0
  275. data/vendor/mail/spec/mail/fields/content_id_field_spec.rb +117 -0
  276. data/vendor/mail/spec/mail/fields/content_location_field_spec.rb +46 -0
  277. data/vendor/mail/spec/mail/fields/content_transfer_encoding_field_spec.rb +113 -0
  278. data/vendor/mail/spec/mail/fields/content_type_field_spec.rb +678 -0
  279. data/vendor/mail/spec/mail/fields/date_field_spec.rb +73 -0
  280. data/vendor/mail/spec/mail/fields/envelope_spec.rb +48 -0
  281. data/vendor/mail/spec/mail/fields/from_field_spec.rb +89 -0
  282. data/vendor/mail/spec/mail/fields/in_reply_to_field_spec.rb +62 -0
  283. data/vendor/mail/spec/mail/fields/keywords_field_spec.rb +66 -0
  284. data/vendor/mail/spec/mail/fields/message_id_field_spec.rb +147 -0
  285. data/vendor/mail/spec/mail/fields/mime_version_field_spec.rb +166 -0
  286. data/vendor/mail/spec/mail/fields/received_field_spec.rb +44 -0
  287. data/vendor/mail/spec/mail/fields/references_field_spec.rb +35 -0
  288. data/vendor/mail/spec/mail/fields/reply_to_field_spec.rb +67 -0
  289. data/vendor/mail/spec/mail/fields/resent_bcc_field_spec.rb +66 -0
  290. data/vendor/mail/spec/mail/fields/resent_cc_field_spec.rb +66 -0
  291. data/vendor/mail/spec/mail/fields/resent_date_field_spec.rb +39 -0
  292. data/vendor/mail/spec/mail/fields/resent_from_field_spec.rb +66 -0
  293. data/vendor/mail/spec/mail/fields/resent_message_id_field_spec.rb +24 -0
  294. data/vendor/mail/spec/mail/fields/resent_sender_field_spec.rb +58 -0
  295. data/vendor/mail/spec/mail/fields/resent_to_field_spec.rb +66 -0
  296. data/vendor/mail/spec/mail/fields/return_path_field_spec.rb +52 -0
  297. data/vendor/mail/spec/mail/fields/sender_field_spec.rb +58 -0
  298. data/vendor/mail/spec/mail/fields/structured_field_spec.rb +72 -0
  299. data/vendor/mail/spec/mail/fields/to_field_spec.rb +92 -0
  300. data/vendor/mail/spec/mail/fields/unstructured_field_spec.rb +134 -0
  301. data/vendor/mail/spec/mail/header_spec.rb +578 -0
  302. data/vendor/mail/spec/mail/mail_spec.rb +34 -0
  303. data/vendor/mail/spec/mail/message_spec.rb +1409 -0
  304. data/vendor/mail/spec/mail/mime_messages_spec.rb +435 -0
  305. data/vendor/mail/spec/mail/multipart_report_spec.rb +112 -0
  306. data/vendor/mail/spec/mail/network/delivery_methods/file_delivery_spec.rb +79 -0
  307. data/vendor/mail/spec/mail/network/delivery_methods/sendmail_spec.rb +125 -0
  308. data/vendor/mail/spec/mail/network/delivery_methods/smtp_spec.rb +133 -0
  309. data/vendor/mail/spec/mail/network/delivery_methods/test_mailer_spec.rb +57 -0
  310. data/vendor/mail/spec/mail/network/retriever_methods/pop3_spec.rb +180 -0
  311. data/vendor/mail/spec/mail/network_spec.rb +359 -0
  312. data/vendor/mail/spec/mail/parsers/address_lists_parser_spec.rb +15 -0
  313. data/vendor/mail/spec/mail/parsers/content_transfer_encoding_parser_spec.rb +72 -0
  314. data/vendor/mail/spec/mail/part_spec.rb +129 -0
  315. data/vendor/mail/spec/mail/parts_list_spec.rb +12 -0
  316. data/vendor/mail/spec/mail/round_tripping_spec.rb +44 -0
  317. data/vendor/mail/spec/mail/utilities_spec.rb +327 -0
  318. data/vendor/mail/spec/mail/version_specific/escape_paren_1_8_spec.rb +32 -0
  319. data/vendor/mail/spec/matchers/break_down_to.rb +35 -0
  320. data/vendor/mail/spec/spec_helper.rb +163 -0
  321. metadata +442 -0
@@ -0,0 +1,502 @@
1
+ INFORMATIONAL
2
+
3
+ Network Working Group E. Hall
4
+ Request for Comments: 4155 September 2005
5
+ Category: Informational
6
+
7
+
8
+ The application/mbox Media Type
9
+
10
+ Status of This Memo
11
+
12
+ This memo provides information for the Internet community. It does
13
+ not specify an Internet standard of any kind. Distribution of this
14
+ memo is unlimited.
15
+
16
+ Copyright Notice
17
+
18
+ Copyright (C) The Internet Society (2005).
19
+
20
+ Abstract
21
+
22
+ This memo requests that the application/mbox media type be authorized
23
+ for allocation by the IESG, according to the terms specified in RFC
24
+ 2048. This memo also defines a default format for the mbox database,
25
+ which must be supported by all conformant implementations.
26
+
27
+ 1. Background and Overview
28
+
29
+ UNIX-like operating systems have historically made widespread use of
30
+ "mbox" database files for a variety of local email purposes. In the
31
+ common case, mbox files store linear sequences of one or more
32
+ electronic mail messages, with local email clients treating the
33
+ database as a logical folder of email messages. mbox databases are
34
+ also used by a variety of other messaging tools, such as mailing list
35
+ management programs, archiving and filtering utilities, messaging
36
+ servers, and other related applications. In recent years, mbox
37
+ databases have also become common on a large number of non-UNIX
38
+ computing platforms, for similar kinds of purposes.
39
+
40
+ The increased pervasiveness of these files has led to an increased
41
+ demand for a standardized, network-wide interchange of these files as
42
+ discrete database objects. In turn, this dictates a need for a
43
+ general media type definition for mbox files, which is the subject
44
+ and purpose of this memo.
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+ Hall Informational [Page 1]
55
+
56
+ RFC 4155 The application/mbox Media Type September 2005
57
+
58
+
59
+ 2. About the mbox Database
60
+
61
+ The mbox database format is not documented in an authoritative
62
+ specification, but instead exists as a well-known output format that
63
+ is anecdotally documented, or which is only authoritatively
64
+ documented for a specific platform or tool.
65
+
66
+ mbox databases typically contain a linear sequence of electronic mail
67
+ messages. Each message begins with a separator line that identifies
68
+ the message sender, and also identifies the date and time at which
69
+ the message was received by the final recipient (either the last-hop
70
+ system in the transfer path, or the system which serves as the
71
+ recipient's mailstore). Each message is typically terminated by an
72
+ empty line. The end of the database is usually recognized by either
73
+ the absence of any additional data, or by the presence of an explicit
74
+ end-of-file marker.
75
+
76
+ The structure of the separator lines vary across implementations, but
77
+ usually contain the exact character sequence of "From", followed by a
78
+ single Space character (0x20), an email address of some kind, another
79
+ Space character, a timestamp sequence of some kind, and an end-of-
80
+ line marker. However, due to the lack of any authoritative
81
+ specification, each of these attributes are known to vary widely
82
+ across implementations. For example, the email address can reflect
83
+ any addressing syntax that has ever been used on any messaging system
84
+ in all of history (specifically including address forms that are not
85
+ compatible with Internet messages, as defined by RFC 2822 [RFC2822]).
86
+ Similarly, the timestamp sequences can also vary according to system
87
+ output, while the end-of-line sequences will often reflect platform-
88
+ specific requirements. Different data formats can even appear within
89
+ a single database as a result of multiple mbox files being
90
+ concatenated together, or because a single file was accessed by
91
+ multiple messaging clients, each of which has used its own syntax for
92
+ the separator line.
93
+
94
+ Message data within mbox databases often reflects site-specific
95
+ peculiarities. For example, it is entirely possible for the message
96
+ body or headers in an mbox database to contain untagged eight-bit
97
+ character data that implicitly reflects a site-specific default
98
+ language or locale, or that reflects local defaults for timestamps
99
+ and email addresses; none of this data is widely portable beyond the
100
+ local scope. Similarly, message data can also contain unencoded
101
+ eight-bit binary data, or can use encoding formats that represent a
102
+ specific platform (e.g., BINHEX or UUENCODE sequences).
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ Hall Informational [Page 2]
111
+
112
+ RFC 4155 The application/mbox Media Type September 2005
113
+
114
+
115
+ Many implementations are also known to escape message body lines that
116
+ begin with the character sequence of "From ", so as to prevent
117
+ confusion with overly-liberal parsers that do not search for full
118
+ separator lines. In the common case, a leading Greater-Than symbol
119
+ (0x3E) is used for this purpose (with "From " becoming ">From ").
120
+ However, other implementations are known not to escape such lines
121
+ unless they are immediately preceded by a blank line or if they also
122
+ appear to contain an email address and a timestamp. Other
123
+ implementations are also known to perform secondary escapes against
124
+ these lines if they are already escaped or quoted, while others
125
+ ignore these mechanisms altogether.
126
+
127
+ A comprehensive description of mbox database files on UNIX-like
128
+ systems can be found at http://qmail.org./man/man5/mbox.html, which
129
+ should be treated as mostly authoritative for those variations that
130
+ are otherwise only documented in anecdotal form. However, readers
131
+ are advised that many other platforms and tools make use of mbox
132
+ databases, and that there are many more potential variations that can
133
+ be encountered in the wild.
134
+
135
+ In order to mitigate errors that may arise from such vagaries, this
136
+ specification defines a "format" parameter to the application/mbox
137
+ media type declaration, which can be used to identify the specific
138
+ kind of mbox database that is being transferred. Furthermore, this
139
+ specification defines a "default" database format which MUST be
140
+ supported by implementations that claim to be compliant with this
141
+ specification, and which is to be used as the implicit format for
142
+ undeclared application/mbox data objects. Additional format types
143
+ are to be defined in subsequent specifications. Messaging systems
144
+ that receive an mbox database with an unknown format parameter value
145
+ SHOULD treat the data as an opaque binary object, as if the data had
146
+ been declared as application/octet-stream
147
+
148
+ Refer to Appendix A for a description of the default mbox format.
149
+
150
+ Note that RFC 2046 [RFC2046] defines the multipart/digest media type
151
+ for transferring platform-independent message files. Because that
152
+ specification defines a set of neutral and strict formatting rules,
153
+ the multipart/digest media type already facilitates highly-
154
+ predictable transfer and conversion operations; as such, implementers
155
+ are strongly encouraged to support and use that media type where
156
+ possible.
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+ Hall Informational [Page 3]
167
+
168
+ RFC 4155 The application/mbox Media Type September 2005
169
+
170
+
171
+ 3. Prerequisites and Terminology
172
+
173
+ Readers of this document are expected to be familiar with the
174
+ specification for MIME [RFC2045] and MIME-type registrations
175
+ [RFC2048].
176
+
177
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
178
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
179
+ document are to be interpreted as described in RFC 2119 [RFC2119].
180
+
181
+ 4. The application/mbox Media Type Registration
182
+
183
+ This section provides the media type registration application (as per
184
+ [RFC2048]).
185
+
186
+ MIME media type name: application
187
+
188
+ MIME subtype name: mbox
189
+
190
+ Required parameters: none
191
+
192
+ Optional parameters: The "format" parameter identifies the format of
193
+ the mbox database and the messages contained therein. The default
194
+ value for the "format" parameter is "default", and refers to the
195
+ formatting rules defined in Appendix A of this memo. mbox databases
196
+ that do not have a "format" parameter SHOULD be interpreted as having
197
+ the implicit "format" value of "default". mbox databases that have
198
+ an unknown value for the "format" parameter SHOULD be treated as
199
+ opaque data objects, as if the media type had been specified as
200
+ application/octet-stream. Additional values for the format parameter
201
+ are to be defined in subsequent specifications, and registered with
202
+ IANA.
203
+
204
+ Encoding considerations: If an email client receives an mbox database
205
+ as a message attachment, and then stores that attachment within a
206
+ local mbox database, the contents of the two database files may
207
+ become irreversibly intermingled, such that both databases are
208
+ rendered unrecognizable. In order to avoid these collisions,
209
+ messaging systems that support this specification MUST encode an mbox
210
+ database (or at a minimum, the separator lines) with non-transparent
211
+ transfer encoding (such as BASE64 or Quoted-Printable) whenever an
212
+ application/mbox object is transferred via messaging protocols.
213
+ Other transfer services are generally encouraged to adopt similar
214
+ encoding strategies in order to allow for any subsequent
215
+ retransmission that might occur, but this is not a requirement.
216
+ Implementers should also be prepared to encode mbox data locally if
217
+ non-compliant data is received.
218
+
219
+
220
+
221
+
222
+ Hall Informational [Page 4]
223
+
224
+ RFC 4155 The application/mbox Media Type September 2005
225
+
226
+
227
+ Security considerations: mbox data is passive, and does not generally
228
+ represent a unique or new security threat. However, there is risk in
229
+ sharing any kind of data, because unintentional information may be
230
+ exposed, and this risk certainly applies to mbox data as well.
231
+
232
+ Interoperability considerations: Due to the lack of a single
233
+ authoritative specification for mbox databases, there are a large
234
+ number of variations between database formats (refer to the
235
+ introduction text for common examples), and it is expected that non-
236
+ conformant data will be erroneously tagged or exchanged. Although
237
+ the "default" format specified in this memo does not allow for these
238
+ kinds of vagaries, prior negotiation or agreement between humans may
239
+ sometimes be needed.
240
+
241
+ Published specification: see Appendix A.
242
+
243
+ Applications that use this media type: hundreds of messaging products
244
+ make use of the mbox database format, in one form or another.
245
+
246
+ Magic number(s): mbox database files can be recognized by having a
247
+ leading character sequence of "From", followed by a single Space
248
+ character (0x20), followed by additional printable character data
249
+ (refer to the description in Appendix A for details). However,
250
+ implementers are cautioned that all such files will not be compliant
251
+ with all of the formatting rules, therefore implementers should treat
252
+ these files with an appropriate amount of circumspection.
253
+
254
+ File extension(s): mbox database files sometimes have an ".mbox"
255
+ extension, but this is not required nor expected. As with magic
256
+ numbers, implementers should avoid reflexive assumptions about the
257
+ contents of such files.
258
+
259
+ Macintosh File Type Code(s): None are known to be common.
260
+
261
+ Person & email address to contact for further information: Eric A.
262
+ Hall (ehall@ntrg.com)
263
+
264
+ Intended usage: COMMON
265
+
266
+ 5. Security Considerations
267
+
268
+ See the discussion in section 4.
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+ Hall Informational [Page 5]
279
+
280
+ RFC 4155 The application/mbox Media Type September 2005
281
+
282
+
283
+ 6. IANA Considerations
284
+
285
+ The IANA has registered the application/mbox media type in the MIME
286
+ registry, using the application provided in section 4 above.
287
+
288
+ Furthermore, IANA has established and will maintain a registry of
289
+ values for the "format" parameter as described in this memo. The
290
+ first registration is the "default" value, using the description
291
+ provided in Appendix A. Subsequent values for the "format" parameter
292
+ MUST be accompanied by some form of recognizable, complete, and
293
+ legitimate specification, such as an IESG-approved specification, or
294
+ some kind of authoritative vendor documentation.
295
+
296
+ 7. Normative References
297
+
298
+ [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
299
+ Extensions (MIME) Part One: Format of Internet Message
300
+ Bodies", RFC 2045, November 1996.
301
+
302
+ [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
303
+ Extensions (MIME) Part Two: Media Types", RFC 2046,
304
+ November 1996.
305
+
306
+ [RFC2048] Freed, N., Klensin, J., and J. Postel, "Multipurpose
307
+ Internet Mail Extensions (MIME) Part Four: Registration
308
+ Procedures", BCP 13, RFC 2048, November 1996.
309
+
310
+ [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
311
+ Requirement Levels", BCP 14, RFC 2119, March 1997.
312
+
313
+ [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April
314
+ 2001.
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+ Hall Informational [Page 6]
335
+
336
+ RFC 4155 The application/mbox Media Type September 2005
337
+
338
+
339
+ Appendix A. The "default" mbox Database Format
340
+
341
+ In order to improve interoperability among messaging systems, this
342
+ memo defines a "default" mbox database format, which MUST be
343
+ supported by all implementations that claim to be compliant with this
344
+ specification.
345
+
346
+ The "default" mbox database format uses a linear sequence of Internet
347
+ messages, with each message being immediately prefaced by a separator
348
+ line, and being terminated by an empty line. More specifically:
349
+
350
+ o Each message within the database MUST follow the syntax and
351
+ formatting rules defined in RFC 2822 [RFC2822] and its related
352
+ specifications, with the exception that the canonical mbox
353
+ database MUST use a single Line-Feed character (0x0A) as the
354
+ end-of-line sequence, and MUST NOT use a Carriage-Return/Line-
355
+ Feed pair (NB: this requirement only applies to the canonical
356
+ mbox database as transferred, and does not override any other
357
+ specifications). This usage represents the most common
358
+ historical representation of the mbox database format, and
359
+ allows for the least amount of conversion.
360
+
361
+ o Messages within the default mbox database MUST consist of
362
+ seven-bit characters within an eight-bit stream. Eight-bit data
363
+ within the stream MUST be converted to a seven-bit form (using
364
+ appropriate, standardized encoding) and appropriately tagged
365
+ (with the correct header fields) before the database is
366
+ transferred.
367
+
368
+ o Message headers and data in the default mbox database MUST be
369
+ fully-qualified, as per the relevant specification(s). For
370
+ example, email addresses in the various header fields MUST have
371
+ legitimate domain names (as per RFC 2822), while extended
372
+ characters and encodings MUST be specified in the appropriate
373
+ location (as per the appropriate MIME specifications), and so
374
+ forth.
375
+
376
+ o Each message in the mbox database MUST be immediately preceded
377
+ by a single separator line, which MUST conform to the following
378
+ syntax:
379
+
380
+ The exact character sequence of "From";
381
+
382
+ a single Space character (0x20);
383
+
384
+ the email address of the message sender (as obtained from the
385
+ message envelope or other authoritative source), conformant
386
+ with the "addr-spec" syntax from RFC 2822;
387
+
388
+
389
+
390
+ Hall Informational [Page 7]
391
+
392
+ RFC 4155 The application/mbox Media Type September 2005
393
+
394
+
395
+ a single Space character;
396
+
397
+ a timestamp indicating the UTC date and time when the message
398
+ was originally received, conformant with the syntax of the
399
+ traditional UNIX 'ctime' output sans timezone (note that the
400
+ use of UTC precludes the need for a timezone indicator);
401
+
402
+ an end-of-line marker.
403
+
404
+ o Each message in the database MUST be terminated by an empty
405
+ line, containing a single end-of-line marker.
406
+
407
+ Note that the first message in an mbox database will only be prefaced
408
+ by a separator line, while every other message will begin with two
409
+ end-of-line sequences (one at the end of the message itself, and
410
+ another to mark the end of the message within the mbox database file
411
+ stream) and a separator line (marking the new message). The end of
412
+ the database is implicitly reached when no more message data or
413
+ separator lines are found.
414
+
415
+ Also note that this specification does not prescribe any escape
416
+ syntax for message body lines that begin with the character sequence
417
+ of "From ". Recipient systems are expected to parse full separator
418
+ lines as they are documented above.
419
+
420
+ Author's Address
421
+
422
+ Eric A. Hall
423
+
424
+ EMail: ehall@ntrg.com
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+ Hall Informational [Page 8]
447
+
448
+ RFC 4155 The application/mbox Media Type September 2005
449
+
450
+
451
+ Full Copyright Statement
452
+
453
+ Copyright (C) The Internet Society (2005).
454
+
455
+ This document is subject to the rights, licenses and restrictions
456
+ contained in BCP 78, and except as set forth therein, the authors
457
+ retain all their rights.
458
+
459
+ This document and the information contained herein are provided on an
460
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
461
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
462
+ ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
463
+ INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
464
+ INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
465
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
466
+
467
+ Intellectual Property
468
+
469
+ The IETF takes no position regarding the validity or scope of any
470
+ Intellectual Property Rights or other rights that might be claimed to
471
+ pertain to the implementation or use of the technology described in
472
+ this document or the extent to which any license under such rights
473
+ might or might not be available; nor does it represent that it has
474
+ made any independent effort to identify any such rights. Information
475
+ on the procedures with respect to rights in RFC documents can be
476
+ found in BCP 78 and BCP 79.
477
+
478
+ Copies of IPR disclosures made to the IETF Secretariat and any
479
+ assurances of licenses to be made available, or the result of an
480
+ attempt made to obtain a general license or permission for the use of
481
+ such proprietary rights by implementers or users of this
482
+ specification can be obtained from the IETF on-line IPR repository at
483
+ http://www.ietf.org/ipr.
484
+
485
+ The IETF invites any interested party to bring to its attention any
486
+ copyrights, patents or patent applications, or other proprietary
487
+ rights that may cover technology that may be required to implement
488
+ this standard. Please address the information to the IETF at ietf-
489
+ ipr@ietf.org.
490
+
491
+ Acknowledgement
492
+
493
+ Funding for the RFC Editor function is currently provided by the
494
+ Internet Society.
495
+
496
+
497
+
498
+
499
+
500
+
501
+
502
+ Hall Informational [Page 9]