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,899 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+ Network Working Group D. Crocker, Ed.
8
+ Request for Comments: 4234 Brandenburg InternetWorking
9
+ Obsoletes: 2234 P. Overell
10
+ Category: Standards Track THUS plc.
11
+ October 2005
12
+
13
+
14
+ Augmented BNF for Syntax Specifications: ABNF
15
+
16
+ Status of This Memo
17
+
18
+ This document specifies an Internet standards track protocol for the
19
+ Internet community, and requests discussion and suggestions for
20
+ improvements. Please refer to the current edition of the "Internet
21
+ Official Protocol Standards" (STD 1) for the standardization state
22
+ and status of this protocol. Distribution of this memo is unlimited.
23
+
24
+ Copyright Notice
25
+
26
+ Copyright (C) The Internet Society (2005).
27
+
28
+ Abstract
29
+
30
+ Internet technical specifications often need to define a formal
31
+ syntax. Over the years, a modified version of Backus-Naur Form
32
+ (BNF), called Augmented BNF (ABNF), has been popular among many
33
+ Internet specifications. The current specification documents ABNF.
34
+ It balances compactness and simplicity, with reasonable
35
+ representational power. The differences between standard BNF and
36
+ ABNF involve naming rules, repetition, alternatives, order-
37
+ independence, and value ranges. This specification also supplies
38
+ additional rule definitions and encoding for a core lexical analyzer
39
+ of the type common to several Internet specifications.
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+ Crocker & Overell Standards Track [Page 1]
59
+
60
+ RFC 4234 ABNF October 2005
61
+
62
+
63
+ Table of Contents
64
+
65
+ 1. INTRODUCTION ....................................................2
66
+ 2. RULE DEFINITION .................................................3
67
+ 2.1. Rule Naming ................................................3
68
+ 2.2. Rule Form ..................................................3
69
+ 2.3. Terminal Values ............................................4
70
+ 2.4. External Encodings .........................................5
71
+ 3. OPERATORS .......................................................6
72
+ 3.1. Concatenation: Rule1 Rule2 ................................6
73
+ 3.2. Alternatives: Rule1 / Rule2 ...............................6
74
+ 3.3. Incremental Alternatives: Rule1 =/ Rule2 ...................7
75
+ 3.4. Value Range Alternatives: %c##-## .........................7
76
+ 3.5. Sequence Group: (Rule1 Rule2) .............................8
77
+ 3.6. Variable Repetition: *Rule ................................8
78
+ 3.7. Specific Repetition: nRule ................................9
79
+ 3.8. Optional Sequence: [RULE] .................................9
80
+ 3.9. Comment: ; Comment ........................................9
81
+ 3.10. Operator Precedence .......................................9
82
+ 4. ABNF DEFINITION OF ABNF ........................................10
83
+ 5. SECURITY CONSIDERATIONS ........................................11
84
+ 6. References .....................................................11
85
+ 6.1. Normative References ......................................11
86
+ 6.2. Informative References ....................................11
87
+ Appendix A. ACKNOWLEDGEMENTS .....................................13
88
+ Appendix B. APPENDIX - CORE ABNF OF ABNF .........................13
89
+ B.1. Core Rules ...............................................13
90
+ B.2. Common Encoding ..........................................14
91
+
92
+ 1. INTRODUCTION
93
+
94
+ Internet technical specifications often need to define a formal
95
+ syntax and are free to employ whatever notation their authors deem
96
+ useful. Over the years, a modified version of Backus-Naur Form
97
+ (BNF), called Augmented BNF (ABNF), has been popular among many
98
+ Internet specifications. It balances compactness and simplicity,
99
+ with reasonable representational power. In the early days of the
100
+ Arpanet, each specification contained its own definition of ABNF.
101
+ This included the email specifications, [RFC733] and then [RFC822],
102
+ which came to be the common citations for defining ABNF. The current
103
+ document separates those definitions to permit selective reference.
104
+ Predictably, it also provides some modifications and enhancements.
105
+
106
+ The differences between standard BNF and ABNF involve naming rules,
107
+ repetition, alternatives, order-independence, and value ranges.
108
+ Appendix B supplies rule definitions and encoding for a core lexical
109
+ analyzer of the type common to several Internet specifications. It
110
+ is provided as a convenience and is otherwise separate from the meta
111
+
112
+
113
+
114
+ Crocker & Overell Standards Track [Page 2]
115
+
116
+ RFC 4234 ABNF October 2005
117
+
118
+
119
+ language defined in the body of this document, and separate from its
120
+ formal status.
121
+
122
+ Changes since [RFC2234]:
123
+
124
+ In Section 3.7, the phrase: "That is, exactly <N> occurrences of
125
+ <element>." was corrected to: "That is, exactly <n> occurrences of
126
+ <element>."
127
+
128
+ Some continuation comment lines needed to be corrected to begin
129
+ with comment character (";").
130
+
131
+ 2. RULE DEFINITION
132
+
133
+ 2.1. Rule Naming
134
+
135
+ The name of a rule is simply the name itself; that is, a sequence of
136
+ characters, beginning with an alphabetic character, and followed by a
137
+ combination of alphabetics, digits, and hyphens (dashes).
138
+
139
+ NOTE:
140
+
141
+ Rule names are case-insensitive
142
+
143
+ The names <rulename>, <Rulename>, <RULENAME>, and <rUlENamE> all
144
+ refer to the same rule.
145
+
146
+ Unlike original BNF, angle brackets ("<", ">") are not required.
147
+ However, angle brackets may be used around a rule name whenever their
148
+ presence facilitates in discerning the use of a rule name. This is
149
+ typically restricted to rule name references in free-form prose, or
150
+ to distinguish partial rules that combine into a string not separated
151
+ by white space, such as shown in the discussion about repetition,
152
+ below.
153
+
154
+ 2.2. Rule Form
155
+
156
+ A rule is defined by the following sequence:
157
+
158
+ name = elements crlf
159
+
160
+ where <name> is the name of the rule, <elements> is one or more rule
161
+ names or terminal specifications, and <crlf> is the end-of-line
162
+ indicator (carriage return followed by line feed). The equal sign
163
+ separates the name from the definition of the rule. The elements
164
+ form a sequence of one or more rule names and/or value definitions,
165
+ combined according to the various operators defined in this document,
166
+ such as alternative and repetition.
167
+
168
+
169
+
170
+ Crocker & Overell Standards Track [Page 3]
171
+
172
+ RFC 4234 ABNF October 2005
173
+
174
+
175
+ For visual ease, rule definitions are left aligned. When a rule
176
+ requires multiple lines, the continuation lines are indented. The
177
+ left alignment and indentation are relative to the first lines of the
178
+ ABNF rules and need not match the left margin of the document.
179
+
180
+ 2.3. Terminal Values
181
+
182
+ Rules resolve into a string of terminal values, sometimes called
183
+ characters. In ABNF, a character is merely a non-negative integer.
184
+ In certain contexts, a specific mapping (encoding) of values into a
185
+ character set (such as ASCII) will be specified.
186
+
187
+ Terminals are specified by one or more numeric characters, with the
188
+ base interpretation of those characters indicated explicitly. The
189
+ following bases are currently defined:
190
+
191
+ b = binary
192
+
193
+ d = decimal
194
+
195
+ x = hexadecimal
196
+
197
+ Hence:
198
+
199
+ CR = %d13
200
+
201
+ CR = %x0D
202
+
203
+ respectively specify the decimal and hexadecimal representation of
204
+ [US-ASCII] for carriage return.
205
+
206
+ A concatenated string of such values is specified compactly, using a
207
+ period (".") to indicate a separation of characters within that
208
+ value. Hence:
209
+
210
+ CRLF = %d13.10
211
+
212
+ ABNF permits the specification of literal text strings directly,
213
+ enclosed in quotation-marks. Hence:
214
+
215
+ command = "command string"
216
+
217
+ Literal text strings are interpreted as a concatenated set of
218
+ printable characters.
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+ Crocker & Overell Standards Track [Page 4]
227
+
228
+ RFC 4234 ABNF October 2005
229
+
230
+
231
+ NOTE:
232
+
233
+ ABNF strings are case-insensitive and the character set for these
234
+ strings is us-ascii.
235
+
236
+ Hence:
237
+
238
+ rulename = "abc"
239
+
240
+ and:
241
+
242
+ rulename = "aBc"
243
+
244
+ will match "abc", "Abc", "aBc", "abC", "ABc", "aBC", "AbC", and
245
+ "ABC".
246
+
247
+ To specify a rule that IS case SENSITIVE, specify the characters
248
+ individually.
249
+
250
+ For example:
251
+
252
+ rulename = %d97 %d98 %d99
253
+
254
+ or
255
+
256
+ rulename = %d97.98.99
257
+
258
+ will match only the string that comprises only the lowercased
259
+ characters, abc.
260
+
261
+ 2.4. External Encodings
262
+
263
+ External representations of terminal value characters will vary
264
+ according to constraints in the storage or transmission environment.
265
+ Hence, the same ABNF-based grammar may have multiple external
266
+ encodings, such as one for a 7-bit US-ASCII environment, another for
267
+ a binary octet environment, and still a different one when 16-bit
268
+ Unicode is used. Encoding details are beyond the scope of ABNF,
269
+ although Appendix A (Core) provides definitions for a 7-bit US-ASCII
270
+ environment as has been common to much of the Internet.
271
+
272
+ By separating external encoding from the syntax, it is intended that
273
+ alternate encoding environments can be used for the same syntax.
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+ Crocker & Overell Standards Track [Page 5]
283
+
284
+ RFC 4234 ABNF October 2005
285
+
286
+
287
+ 3. OPERATORS
288
+
289
+ 3.1. Concatenation: Rule1 Rule2
290
+
291
+ A rule can define a simple, ordered string of values (i.e., a
292
+ concatenation of contiguous characters) by listing a sequence of rule
293
+ names. For example:
294
+
295
+ foo = %x61 ; a
296
+
297
+ bar = %x62 ; b
298
+
299
+ mumble = foo bar foo
300
+
301
+ So that the rule <mumble> matches the lowercase string "aba".
302
+
303
+ LINEAR WHITE SPACE: Concatenation is at the core of the ABNF parsing
304
+ model. A string of contiguous characters (values) is parsed
305
+ according to the rules defined in ABNF. For Internet specifications,
306
+ there is some history of permitting linear white space (space and
307
+ horizontal tab) to be freely and implicitly interspersed around major
308
+ constructs, such as delimiting special characters or atomic strings.
309
+
310
+ NOTE:
311
+
312
+ This specification for ABNF does not provide for implicit
313
+ specification of linear white space.
314
+
315
+ Any grammar that wishes to permit linear white space around
316
+ delimiters or string segments must specify it explicitly. It is
317
+ often useful to provide for such white space in "core" rules that are
318
+ then used variously among higher-level rules. The "core" rules might
319
+ be formed into a lexical analyzer or simply be part of the main
320
+ ruleset.
321
+
322
+ 3.2. Alternatives: Rule1 / Rule2
323
+
324
+ Elements separated by a forward slash ("/") are alternatives.
325
+ Therefore,
326
+
327
+ foo / bar
328
+
329
+ will accept <foo> or <bar>.
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+ Crocker & Overell Standards Track [Page 6]
339
+
340
+ RFC 4234 ABNF October 2005
341
+
342
+
343
+ NOTE:
344
+
345
+ A quoted string containing alphabetic characters is a special form
346
+ for specifying alternative characters and is interpreted as a
347
+ non-terminal representing the set of combinatorial strings with
348
+ the contained characters, in the specified order but with any
349
+ mixture of upper and lower case.
350
+
351
+ 3.3. Incremental Alternatives: Rule1 =/ Rule2
352
+
353
+ It is sometimes convenient to specify a list of alternatives in
354
+ fragments. That is, an initial rule may match one or more
355
+ alternatives, with later rule definitions adding to the set of
356
+ alternatives. This is particularly useful for otherwise, independent
357
+ specifications that derive from the same parent rule set, such as
358
+ often occurs with parameter lists. ABNF permits this incremental
359
+ definition through the construct:
360
+
361
+ oldrule =/ additional-alternatives
362
+
363
+ So that the rule set
364
+
365
+ ruleset = alt1 / alt2
366
+
367
+ ruleset =/ alt3
368
+
369
+ ruleset =/ alt4 / alt5
370
+
371
+ is the same as specifying
372
+
373
+ ruleset = alt1 / alt2 / alt3 / alt4 / alt5
374
+
375
+ 3.4. Value Range Alternatives: %c##-##
376
+
377
+ A range of alternative numeric values can be specified compactly,
378
+ using dash ("-") to indicate the range of alternative values. Hence:
379
+
380
+ DIGIT = %x30-39
381
+
382
+ is equivalent to:
383
+
384
+ DIGIT = "0" / "1" / "2" / "3" / "4" / "5" / "6" /
385
+
386
+ "7" / "8" / "9"
387
+
388
+ Concatenated numeric values and numeric value ranges cannot be
389
+ specified in the same string. A numeric value may use the dotted
390
+ notation for concatenation or it may use the dash notation to specify
391
+
392
+
393
+
394
+ Crocker & Overell Standards Track [Page 7]
395
+
396
+ RFC 4234 ABNF October 2005
397
+
398
+
399
+ one value range. Hence, to specify one printable character between
400
+ end of line sequences, the specification could be:
401
+
402
+ char-line = %x0D.0A %x20-7E %x0D.0A
403
+
404
+ 3.5. Sequence Group: (Rule1 Rule2)
405
+
406
+ Elements enclosed in parentheses are treated as a single element,
407
+ whose contents are STRICTLY ORDERED. Thus,
408
+
409
+ elem (foo / bar) blat
410
+
411
+ matches (elem foo blat) or (elem bar blat), and
412
+
413
+ elem foo / bar blat
414
+
415
+ matches (elem foo) or (bar blat).
416
+
417
+ NOTE:
418
+
419
+ It is strongly advised that grouping notation be used, rather than
420
+ relying on the proper reading of "bare" alternations, when
421
+ alternatives consist of multiple rule names or literals.
422
+
423
+ Hence, it is recommended that the following form be used:
424
+
425
+ (elem foo) / (bar blat)
426
+
427
+ It will avoid misinterpretation by casual readers.
428
+
429
+ The sequence group notation is also used within free text to set off
430
+ an element sequence from the prose.
431
+
432
+ 3.6. Variable Repetition: *Rule
433
+
434
+ The operator "*" preceding an element indicates repetition. The full
435
+ form is:
436
+
437
+ <a>*<b>element
438
+
439
+ where <a> and <b> are optional decimal values, indicating at least
440
+ <a> and at most <b> occurrences of the element.
441
+
442
+ Default values are 0 and infinity so that *<element> allows any
443
+ number, including zero; 1*<element> requires at least one;
444
+ 3*3<element> allows exactly 3 and 1*2<element> allows one or two.
445
+
446
+
447
+
448
+
449
+
450
+ Crocker & Overell Standards Track [Page 8]
451
+
452
+ RFC 4234 ABNF October 2005
453
+
454
+
455
+ 3.7. Specific Repetition: nRule
456
+
457
+ A rule of the form:
458
+
459
+ <n>element
460
+
461
+ is equivalent to
462
+
463
+ <n>*<n>element
464
+
465
+ That is, exactly <n> occurrences of <element>. Thus, 2DIGIT is a 2-
466
+ digit number, and 3ALPHA is a string of three alphabetic characters.
467
+
468
+ 3.8. Optional Sequence: [RULE]
469
+
470
+ Square brackets enclose an optional element sequence:
471
+
472
+ [foo bar]
473
+
474
+ is equivalent to
475
+
476
+ *1(foo bar).
477
+
478
+ 3.9. Comment: ; Comment
479
+
480
+ A semi-colon starts a comment that continues to the end of line.
481
+ This is a simple way of including useful notes in parallel with the
482
+ specifications.
483
+
484
+ 3.10. Operator Precedence
485
+
486
+ The various mechanisms described above have the following precedence,
487
+ from highest (binding tightest) at the top, to lowest (loosest) at
488
+ the bottom:
489
+
490
+ Strings, Names formation
491
+
492
+ Comment
493
+
494
+ Value range
495
+
496
+ Repetition
497
+
498
+ Grouping, Optional
499
+
500
+ Concatenation
501
+
502
+ Alternative
503
+
504
+
505
+
506
+ Crocker & Overell Standards Track [Page 9]
507
+
508
+ RFC 4234 ABNF October 2005
509
+
510
+
511
+ Use of the alternative operator, freely mixed with concatenations,
512
+ can be confusing.
513
+
514
+ Again, it is recommended that the grouping operator be used to
515
+ make explicit concatenation groups.
516
+
517
+ 4. ABNF DEFINITION OF ABNF
518
+
519
+ NOTES:
520
+
521
+ 1. This syntax requires a formatting of rules that is relatively
522
+ strict. Hence, the version of a ruleset included in a
523
+ specification might need preprocessing to ensure that it can be
524
+ interpreted by an ABNF parser.
525
+
526
+ 2. This syntax uses the rules provided in Appendix B (Core).
527
+
528
+ rulelist = 1*( rule / (*c-wsp c-nl) )
529
+
530
+ rule = rulename defined-as elements c-nl
531
+ ; continues if next line starts
532
+ ; with white space
533
+
534
+ rulename = ALPHA *(ALPHA / DIGIT / "-")
535
+
536
+ defined-as = *c-wsp ("=" / "=/") *c-wsp
537
+ ; basic rules definition and
538
+ ; incremental alternatives
539
+
540
+ elements = alternation *c-wsp
541
+
542
+ c-wsp = WSP / (c-nl WSP)
543
+
544
+ c-nl = comment / CRLF
545
+ ; comment or newline
546
+
547
+ comment = ";" *(WSP / VCHAR) CRLF
548
+
549
+ alternation = concatenation
550
+ *(*c-wsp "/" *c-wsp concatenation)
551
+
552
+ concatenation = repetition *(1*c-wsp repetition)
553
+
554
+ repetition = [repeat] element
555
+
556
+ repeat = 1*DIGIT / (*DIGIT "*" *DIGIT)
557
+
558
+
559
+
560
+
561
+
562
+ Crocker & Overell Standards Track [Page 10]
563
+
564
+ RFC 4234 ABNF October 2005
565
+
566
+
567
+ element = rulename / group / option /
568
+ char-val / num-val / prose-val
569
+
570
+ group = "(" *c-wsp alternation *c-wsp ")"
571
+
572
+ option = "[" *c-wsp alternation *c-wsp "]"
573
+
574
+ char-val = DQUOTE *(%x20-21 / %x23-7E) DQUOTE
575
+ ; quoted string of SP and VCHAR
576
+ ; without DQUOTE
577
+
578
+ num-val = "%" (bin-val / dec-val / hex-val)
579
+
580
+ bin-val = "b" 1*BIT
581
+ [ 1*("." 1*BIT) / ("-" 1*BIT) ]
582
+ ; series of concatenated bit values
583
+ ; or single ONEOF range
584
+
585
+ dec-val = "d" 1*DIGIT
586
+ [ 1*("." 1*DIGIT) / ("-" 1*DIGIT) ]
587
+
588
+ hex-val = "x" 1*HEXDIG
589
+ [ 1*("." 1*HEXDIG) / ("-" 1*HEXDIG) ]
590
+
591
+ prose-val = "<" *(%x20-3D / %x3F-7E) ">"
592
+ ; bracketed string of SP and VCHAR
593
+ ; without angles
594
+ ; prose description, to be used as
595
+ ; last resort
596
+
597
+ 5. SECURITY CONSIDERATIONS
598
+
599
+ Security is truly believed to be irrelevant to this document.
600
+
601
+ 6. References
602
+
603
+ 6.1. Normative References
604
+
605
+ [US-ASCII] American National Standards Institute, "Coded Character
606
+ Set -- 7-bit American Standard Code for Information
607
+ Interchange", ANSI X3.4, 1986.
608
+
609
+ 6.2. Informative References
610
+
611
+ [RFC2234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
612
+ Specifications: ABNF", RFC 2234, November 1997.
613
+
614
+
615
+
616
+
617
+
618
+ Crocker & Overell Standards Track [Page 11]
619
+
620
+ RFC 4234 ABNF October 2005
621
+
622
+
623
+ [RFC733] Crocker, D., Vittal, J., Pogran, K., and D. Henderson,
624
+ "Standard for the format of ARPA network text messages",
625
+ RFC 733, November 1977.
626
+
627
+ [RFC822] Crocker, D., "Standard for the format of ARPA Internet
628
+ text messages", STD 11, RFC 822, August 1982.
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+
663
+
664
+
665
+
666
+
667
+
668
+
669
+
670
+
671
+
672
+
673
+
674
+ Crocker & Overell Standards Track [Page 12]
675
+
676
+ RFC 4234 ABNF October 2005
677
+
678
+
679
+ Appendix A. ACKNOWLEDGEMENTS
680
+
681
+ The syntax for ABNF was originally specified in RFC 733. Ken L.
682
+ Harrenstien, of SRI International, was responsible for re-coding the
683
+ BNF into an augmented BNF that makes the representation smaller and
684
+ easier to understand.
685
+
686
+ This recent project began as a simple effort to cull out the portion
687
+ of RFC 822 that has been repeatedly cited by non-email specification
688
+ writers, namely the description of augmented BNF. Rather than simply
689
+ and blindly converting the existing text into a separate document,
690
+ the working group chose to give careful consideration to the
691
+ deficiencies, as well as benefits, of the existing specification and
692
+ related specifications made available over the last 15 years, and
693
+ therefore to pursue enhancement. This turned the project into
694
+ something rather more ambitious than was first intended.
695
+ Interestingly, the result is not massively different from that
696
+ original, although decisions, such as removing the list notation,
697
+ came as a surprise.
698
+
699
+ This "separated" version of the specification was part of the DRUMS
700
+ working group, with significant contributions from Jerome Abela,
701
+ Harald Alvestrand, Robert Elz, Roger Fajman, Aviva Garrett, Tom
702
+ Harsch, Dan Kohn, Bill McQuillan, Keith Moore, Chris Newman, Pete
703
+ Resnick, and Henning Schulzrinne.
704
+
705
+ Julian Reschke warrants a special thanks for converting the Draft
706
+ Standard version to XML source form.
707
+
708
+ Appendix B. APPENDIX - CORE ABNF OF ABNF
709
+
710
+ This Appendix is provided as a convenient core for specific grammars.
711
+ The definitions may be used as a core set of rules.
712
+
713
+ B.1. Core Rules
714
+
715
+ Certain basic rules are in uppercase, such as SP, HTAB, CRLF, DIGIT,
716
+ ALPHA, etc.
717
+
718
+ ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
719
+
720
+ BIT = "0" / "1"
721
+
722
+ CHAR = %x01-7F
723
+ ; any 7-bit US-ASCII character,
724
+ ; excluding NUL
725
+
726
+
727
+
728
+
729
+
730
+ Crocker & Overell Standards Track [Page 13]
731
+
732
+ RFC 4234 ABNF October 2005
733
+
734
+
735
+ CR = %x0D
736
+ ; carriage return
737
+
738
+ CRLF = CR LF
739
+ ; Internet standard newline
740
+
741
+ CTL = %x00-1F / %x7F
742
+ ; controls
743
+
744
+ DIGIT = %x30-39
745
+ ; 0-9
746
+
747
+ DQUOTE = %x22
748
+ ; " (Double Quote)
749
+
750
+ HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
751
+
752
+ HTAB = %x09
753
+ ; horizontal tab
754
+
755
+ LF = %x0A
756
+ ; linefeed
757
+
758
+ LWSP = *(WSP / CRLF WSP)
759
+ ; linear white space (past newline)
760
+
761
+ OCTET = %x00-FF
762
+ ; 8 bits of data
763
+
764
+ SP = %x20
765
+
766
+ VCHAR = %x21-7E
767
+ ; visible (printing) characters
768
+
769
+ WSP = SP / HTAB
770
+ ; white space
771
+
772
+ B.2. Common Encoding
773
+
774
+ Externally, data are represented as "network virtual ASCII" (namely,
775
+ 7-bit US-ASCII in an 8-bit field), with the high (8th) bit set to
776
+ zero. A string of values is in "network byte order", in which the
777
+ higher-valued bytes are represented on the left-hand side and are
778
+ sent over the network first.
779
+
780
+
781
+
782
+
783
+
784
+
785
+
786
+ Crocker & Overell Standards Track [Page 14]
787
+
788
+ RFC 4234 ABNF October 2005
789
+
790
+
791
+ Authors' Addresses
792
+
793
+ Dave Crocker (editor)
794
+ Brandenburg InternetWorking
795
+ 675 Spruce Dr.
796
+ Sunnyvale, CA 94086
797
+ US
798
+
799
+ Phone: +1.408.246.8253
800
+ EMail: dcrocker@bbiw.net
801
+
802
+
803
+ Paul Overell
804
+ THUS plc.
805
+ 1/2 Berkeley Square
806
+ 99 Berkeley Street
807
+ Glasgow
808
+ G3 7HR
809
+ UK
810
+
811
+ EMail: paul.overell@thus.net
812
+
813
+
814
+
815
+
816
+
817
+
818
+
819
+
820
+
821
+
822
+
823
+
824
+
825
+
826
+
827
+
828
+
829
+
830
+
831
+
832
+
833
+
834
+
835
+
836
+
837
+
838
+
839
+
840
+
841
+
842
+ Crocker & Overell Standards Track [Page 15]
843
+
844
+ RFC 4234 ABNF October 2005
845
+
846
+
847
+ Full Copyright Statement
848
+
849
+ Copyright (C) The Internet Society (2005).
850
+
851
+ This document is subject to the rights, licenses and restrictions
852
+ contained in BCP 78, and except as set forth therein, the authors
853
+ retain all their rights.
854
+
855
+ This document and the information contained herein are provided on an
856
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
857
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
858
+ ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
859
+ INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
860
+ INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
861
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
862
+
863
+ Intellectual Property
864
+
865
+ The IETF takes no position regarding the validity or scope of any
866
+ Intellectual Property Rights or other rights that might be claimed to
867
+ pertain to the implementation or use of the technology described in
868
+ this document or the extent to which any license under such rights
869
+ might or might not be available; nor does it represent that it has
870
+ made any independent effort to identify any such rights. Information
871
+ on the procedures with respect to rights in RFC documents can be
872
+ found in BCP 78 and BCP 79.
873
+
874
+ Copies of IPR disclosures made to the IETF Secretariat and any
875
+ assurances of licenses to be made available, or the result of an
876
+ attempt made to obtain a general license or permission for the use of
877
+ such proprietary rights by implementers or users of this
878
+ specification can be obtained from the IETF on-line IPR repository at
879
+ http://www.ietf.org/ipr.
880
+
881
+ The IETF invites any interested party to bring to its attention any
882
+ copyrights, patents or patent applications, or other proprietary
883
+ rights that may cover technology that may be required to implement
884
+ this standard. Please address the information to the IETF at ietf-
885
+ ipr@ietf.org.
886
+
887
+ Acknowledgement
888
+
889
+ Funding for the RFC Editor function is currently provided by the
890
+ Internet Society.
891
+
892
+
893
+
894
+
895
+
896
+
897
+
898
+ Crocker & Overell Standards Track [Page 16]
899
+