CVersionInfoDr. Detlef Meyer-EltzPParsergenerator and Interpreter1.7.1.0 Tetra.exe+Copyright 2002 - 09 Dr. Detlef Meyer-Eltz Tetra.exeTextTransformernormal>ATEXTCTokenXPMATEXT3specification as single character changed to repeat[-!#-'*+/-9=?A-Z\^_`-~]+ BCHARNOSPACECTokenDQM BCHARNOSPACE[-[:alnum:]'()+_,./:=?]BCHARSCToken0RMBCHARSD {0,69} matches empty. Therefore BCHARS has to be used as optional[-[:alnum:]'()+_,./:=? ]{1,69} BODY_TEXTCTokenSM BODY_TEXT[^\r\n]{1,998}BOUNDARY_BEGINCTokenTMBOUNDARY_BEGIN {DYNAMIC} BOUNDARY_ENDCTokenTM BOUNDARY_END {DYNAMIC}CLOSE_DELIMITER0CTokenUMCLOSE_DELIMITER0is matched from DELIMITER tooC\r\n--[-[:alnum:]'()+_,./:=? ]{0,69}[-[:alnum:]'()+_,./:=?]--[ \t]*CRCTokenVMCR ASCII 015 ?\rCRLFCTokenWMCRLF\r\nCTEXTCTokenXMCTEXT3specification as single character changed to repeat[^()\\\t\n\r \x7F-\xFF]+ CTEXT_OLDCTokenYM CTEXT_OLD[^()\\\r\x80-\xFF]DAYCToken|ZMDAY\d{1,2} DELIMITERCTokenh[M DELIMITER+experimentell: matcht CLOSE_DELIMITER nicht]\r\n \ // CrLf -- \ [-[:alnum:]'()+_,./:=? ]{0,69} \ [[:alnum:]'()+_,./:=?] \ [ \t]* DELIMITER0CTokenT\M DELIMITER0matcht auch CLOSE_DELIMITER^\r\n \ // CrLf -- \ [-[:alnum:]'()+_,./:=? ]{0,69} \ [-[:alnum:]'()+_,./:=?] \ [ \t]*DIGITSCToken@]MDIGITS\d+ DOT_ATOM_TEXTCToken,^M DOT_ATOM_TEXT{ATEXT}(\.{ATEXT})*DTEXTCToken_MDTEXT3specification as single character changed to repeat[^\[\]\\\t\n\r \x7F-\xFF]+ ENCODED_WORDCToken`M ENCODED_WORDsee RFC 2047: each line of a header field that contains one or more 'encoded-word's is limited to 76 characters =\?([\x20-\x7E]*)\?(Q|B)\?([\x20-\x7E]*)?= .=\?[^\r\n\t ?]+\?[^\r\n\t ?]+\?[^\r\n\t ?]+\?=EOLCToken(LEOL\r?\nFTEXTCTokenGFTEXTMcharacters that have values between 33. and 126., decimal, except colon[^\x{00}- :\x{7f}]+FTEXT_SPECIALSCTokenGFTEXT_SPECIALS'[-!\"#$%&'()*+,./;<=>?@\[\\\]\^_`{|}~]+ FTEXT_WORDCToken_ FTEXT_WORD [A-Za-z]+FWSCToken`FWSfolding white space (\r\n[ \t]+)+ HEX_OCTETCTokenda HEX_OCTET=[\dA-F][\dA-F]HOURCTokenTYHOUR\d{2,2} ITEM_NAMECToken0Z ITEM_NAME[[:alpha:]](-?[[:alnum:]])* LWSP_CHARCToken [ LWSP_CHAR[ \t]MINUTECTokenLMINUTE\d{2,2}NO_FOLD_LITERALCTokenNO_FOLD_LITERAL>\[([^"\\\r\n\x80-\xFF]*({QUOTED_PAIR}[^"\\\r\n\x80-\xFF]*)*)\] NO_FOLD_QUOTECToken NO_FOLD_QUOTE<"([^"\\\r\n\x80-\xFF]*({QUOTED_PAIR}[^"\\\r\n\x80-\xFF]*)*)" NO_WS_CTLCToken| NO_WS_CTL \x{01}-\b\v\f\x{0e}-\x{1f}\x{7f} NON_ASCIICTokenh NON_ASCII [\x7F-\xFF]+OBS_CHARCTokenTOBS_CHAR %d0-127 except CR and LF[^\r\n\x80-\xFF]OBS_QUOTED_PAIRCToken@OBS_QUOTED_PAIR \\[\x00-\x7F]OBS_TEXTCToken,OBS_TEXT, eigentlich: \n*\r*([^\r\n\x80-\xFF]\n*\r*)*\n*\r*([^\r\n\x80-\xFF]\n*\r*)+OBS_YEARCTokenOBS_YEAR\d{2,2}OBS_ZONECTokenOBS_ZONE UT|GMT \// Universal Time |EST|EDT \// Eastern: - 5/ - 4 |CST|CDT \// Central: - 6/ - 5 |MST|MDT \// Mountain: - 7/ - 6 |PST|PDT \// Pacific: - 8/ - 7 |[ABCDEFGHI] \// Military zones |[K-Z] \ |[abcdefghi] \ |[k-z]OCTET1CTokenOCTET1cnot '\r' and not '\n' and not characters that have values between 33. and 126 decimal (FTEXT) [^\r\n!-~]+OCTET2CTokenOCTET2#beginning with single '\r' or '\n' ([\r\n][^\r\n:]+)+OCTET3CToken OCTET3cnot '\r' and not '\n' and not characters that have values between 33. and 126 decimal (FTEXT)[^\r\n[:alpha:][:digit:]]+OCTET4CToken!OCTET4 [\r\n][^\r\n[:alpha:][:digit:]]+OCTET5CToken"OCTET5[\r\n]([[:alpha:][:digit:]]+)OCTETSCToken#OCTETSanything, single '\r' or '\n' too, but not CRLF to recognize a possible BOUNDARY Colon is excluded to avoid match of a "field_name :"[^\r\n]+([\r\n][^\r\n]+)*| \ // not beginning with single '\r' or '\n' ([\r\n][^\r\n]+)+ // beginning with single '\r' or '\n'OCTETS0CToken&OCTETS0Qanything, single '\r' or '\n' too, but not CRLF to recognize a possible BOUNDARY-[^\r\n]+([\r\n][^\r\n]+)*| \([\r\n][^\r\n]+)+QTEXTCToken'QTEXTNon white space controls and the rest of the US-ASCII characters not including "\" or the quote character specification as single character changed to repeat[^"\\\t\n\r \x7F-\xFF]+ QUOTED_PAIRCTokenL) QUOTED_PAIR\\[^\r\n\x80-\xFF] SAFE_CHARCToken8* SAFE_CHAR[!-<>-~]SECONDCToken$+SECOND\d{2,2}SPECIALSCToken,SPECIALSRFC822 and RFC2822[()<>\[\];:@\\,."]STRINGCToken,STRING "([^"\r\n]*)"TEXTCToken-TEXTXnot used in this project Characters excluding CR and LF : [^\r\n\x80-\xFF] | OBS_TEXT? {OBS_TEXT}TOKENCToken.TOKEN[^()<>@,;:\\"/\[\]?=\x00-\x1F]+ TSPECIALSCToken/ TSPECIALSRFC2045: the same as the RFC 822 definition of "specials" with the addition of the three characters "/", "?", and "=", and the removal of "."[()<>@,;:\\/\[\]?=]UTEXTCToken1UTEXTincluding obs-utext[\x00-\t\v\f\x0e-\x7f]+WORDCToken2WORD [[:alpha:]]+YEARCToken3YEAR\d{4,4}ZONECToken4ZONE[-+]\d{4,4}|{OBS_ZONE}_messageCToken5_messagemessage _multipartCTokenp6 _multipart multipart_plainCToken\7_plainplain_rfc822CTokenH8_rfc822rfc822_textCToken49_texttext addr_specCProduction_LINKP: addr_speclocal_part "@" FWS? domainaddressCProduction_LINK <addressmailbox | group phrase ( angle_addr //mailbox | "@" FWS? domain //mailbox | ":" FWS? mailbox_list? ";" FWS? // group ) | angle_addr //mailbox address_listCProduction_LINKL address_listaddress ("," FWS? address )* angle_addrCProduction_LINK8bM angle_addr+"<" FWS? obs_route? addr_spec ">" FWS? angle_valueCProduction_LINKcM angle_value>"<" FWS? // FWS? not before NO_FOLD_QUOTE ? ( obs_route addr_spec ">" FWS? angle_addr* | ( NO_FOLD_QUOTE "@" id_right ">" FWS? | local_part "@" ( DOT_ATOM_TEXT ">" FWS? | NO_FOLD_LITERAL ">" FWS? | FWS? domain ">" FWS? angle_addr* ) ) ) \t application_typeCProduction_LINKeMapplication_type?"application" "/" ( "octet-stream" | "PostScript" | subtype ) attributeCProduction_LINK"Content-Description" ":" utext // dme utext statt text* ? discrete_typeCProduction_LINK@r discrete_typed "text" | "image" | "audio" | "video" | "application" // provisorisch | extension_token dispositionCProduction_LINK| dispositionH"Content-Disposition" ":" disposition_type (";" disposition_parm)* disposition_parmCProduction_LINK<disposition_parmm filename_parm | creation_date_parm | modification_date_parm | read_date_parm | size_parm | parameter disposition_typeCProduction_LINK>Jdisposition_typeQ "inline" | "attachment" | extension_token // values are not case-sensitive domainCProduction_LINKsdomain phrase | domain_literal domain_literalCProduction_LINKudomain_literal%"[" FWS? ( dcontent FWS?)* "]" FWS? encapsulationCProduction_LINKtw encapsulationSBOUNDARY_BEGIN body_part ( BOUNDARY_END {{ PopScope(); }} epilogue? )? encodingCProduction_LINK0yencoding)"Content-Transfer-Encoding" ":" mechanismentity_headersCProduction_LINKzentity_headersq content CRLF | encoding CRLF | disposition | id CRLF | description CRLF | MIME_extension_field CRLF entity_headers0CProduction_LINK4}entity_headers0(lschbare Struktur in einer Wiederholungk(content CRLF )? (encoding CRLF )? (id CRLF )? (description CRLF )? (MIME_extension_field CRLF )* \t epilogueCProduction_LINKdepilogue*//discard_text CRLF (BODY_TEXT* CRLF )* extension_tokenCProduction_LINKhMextension_token ietf_token | x_token field_nameCProduction_LINK field_nameftext fieldsCProduction_LINKfields return_field | received | resent_date | resent_from | resent_sender | resent_to | resent_cc | resent_bcc | resent_msg_id | obs_resent_rply // obs | orig_date | from | sender | reply_to | to | cc | bcc | message_id | in_reply_to | references | subject | comments | keywords | optional_field filename_parmCProduction_LINK82l filename_parm7{{ str sDummy; }} "filename" "=" value[sDummy] fromCProduction_LINKfrom%"From" ":" FWS? mailbox_list CRLF ftextCProduction_LINKftextMcharacters that have values between 33. and 126., decimal, except colon7( FTEXT_WORD | DIGITS | FTEXT_SPECIALS )+ hex_octetCProduction_LINK hex_octetOctet must be used for characters > 127, =, SPACEs or TABs at the ends of lines, and is recommended for any character not listed in RFC 2049 as "mail-safe". HEX_OCTET iana_tokenCProduction_LINKP iana_tokenoA publicly-defined extension token. Tokens of this form must be registered with IANA as specified in RFC 2048. SKIP idCProduction_LINKTidmsg_id s. rfc2822"Content-ID" ":" ( msg_id | id_left {{ m_iResult = -1; log << "wrong id msg_id" << endl;}} // e.g. ED80A1E3E2F ) id_leftCProduction_LINKid_left% NO_FOLD_QUOTE FWS? | obs_id_left id_rightCProduction_LINKid_right7 DOT_ATOM_TEXT | NO_FOLD_LITERAL | FWS? obs_id_right ietf_tokenCProduction_LINK ietf_tokenMAn extension token defined by a standards-track RFC and registered with IANA.SKIP image_typeCProduction_LINK image_type*"image" "/" ( "jpeg" | "gif" | subtype ) in_reply_toCProduction_LINK in_reply_to[The obsolete "In-Reply-To:" field differ from the current syntax in that they allow phraseI"In-Reply-To" ":" FWS? msg_id* ( phrase ( msg_id phrase? )* )? CRLF is_fieldnameCProduction_LINK is_fieldnamefield_name ":" item_nameCProduction_LINK item_name// ITEM_NAME // not distinguishable from ATEXT "from" // sending host | "by" // receiving host | "via" // physical path | "with" // link/mail protocol | "id" // receiver msg id | "for" \t item_valueCProduction_LINK item_valueJ phrase ( "@" FWS? domain )? | domain_literal | angle_value keywordsCProduction_LINKkeywordsWThe obs-phrase-list provides for "empty" elements in a comma-separated list of phrases.o"Keywords" ":" FWS? ( ( phrase | "," FWS? phrase? ) ("," FWS? phrase? )* ) CRLF local_partCProduction_LINK local_partspecial case of phrase#word FWS? ( "." FWS? word FWS? )* mailboxCProduction_LINKmailbox0local_part as special case of generalized phraseX phrase ( angle_addr | "@" FWS? domain ) | angle_addr mailbox_listCProduction_LINK mailbox_list< mailbox ("," FWS? mailbox? )* | ("," FWS? mailbox? )+ mechanismCProduction_LINK mechanism "7bit" | "8bit" | "binary" | "quoted-printable" | "base64" // provisorisch | ietf_token // provisorisch | x_token messageCProduction_LINKmessageTests, whether the e-mail is constructed formally correct. If the mail is parsed 0 is returned. Parser errors should be regarded as spam.{{ m_iResult = 0; }} MIME_message_headers ( IF(IsMultiPart()) multipart_body ELSE CRLF text* //body? END )? {{ out << m_iResult; // has to be called before CopyToDisk CopyToDisk(); }} 4` message_idCProduction_LINKjM message_id"Message-ID" ":" FWS? ( msg_id | id_left {{ m_iResult = -1; log << "wrong msg_id" << endl; }} // e.g. ED80A1E3E2F ) CRLF message_typeCProduction_LINK@lM message_typeD_message "/" ( _rfc822 | "partial" | "external-body" | subtype ) MIME_extension_fieldCProduction_LINKmMMIME_extension_fieldAAny RFC 822 header field which begins with the string "Content-" "Content-" SKIP MIME_message_headersCProduction_LINKoMMIME_message_headersUThe ordering of the header fields implied by this BNF definition should be ignored. 9( entity_headers | fields | version )+ mime_octetsCProduction_LINK mime_octetsoctets_begin octet* 4` MIME_part_headerCProduction_LINKMIME_part_headerAny field not beginning with "content-" can have no defined meaning and may be ignored. The ordering of the header fields implied by this BNF definition should be ignored.& entity_headers | fields \t mime_textCProduction_LINKp mime_textoctets_begin text* 4` modification_date_parmCProduction_LINKPmodification_date_parm."modification-date" "=" quoted_date_time month_nameCProduction_LINKt month_nameu "Jan" | "Feb" | "Mar" | "Apr" | "May" | "Jun" | "Jul" | "Aug" | "Sep" | "Oct" | "Nov" | "Dec"msg_idCProduction_LINKxmsg_idu"<" id_left ( ">" {{ m_iResult = -1; log << "wrong msg_id" << endl; }} | "@" id_right ">" ) FWS? multipart_bodyCProduction_LINK|multipart_bodybody_part? ( IF(IsMultiPart()) multipart_encapsulation ELSE encapsulation END )* //BOUNDARY_END {{ PopScope(); }} //epilogue? 4`multipart_encapsulationCProduction_LINKmultipart_encapsulationBOUNDARY_BEGIN body_part ( IF(IsMultiPart()) multipart_encapsulation ELSE encapsulation END )* ( BOUNDARY_END {{ PopScope(); }} epilogue? )? \t multipart_typeCProduction_LINKmultipart_typeT"multipart" "/" ( "mixed" | "alternative" | "parallel" | "digest" | subtype ) name_val_listCProduction_LINK name_val_list2name_val_pair can end with FWS? in all alternaivesname_val_pair+ name_val_pairCProduction_LINK name_val_pairhitem_name FWS? ( item_value | {{m_iResult = -1; log << "missing item_name" << endl;}} ) obs_domain_listCProduction_LINKobs_domain_list0"@" FWS? domain (("," FWS? )* "@" FWS? domain )* obs_id_leftCProduction_LINK obs_id_left local_part obs_id_rightCProduction_LINK obs_id_rightdomainobs_resent_rplyCProduction_LINKobs_resent_rply not allowed in RFC2822."Resent-Reply-To" ":" FWS? address_list CRLF obs_routeCProduction_LINKT obs_routeobs_domain_list ":" FWS? obs_yearCProduction_LINKobs_yearOBS_YEARoctetCProduction_LINKoctetno comment inclusion OCTETS | CRLF // makes a stop before a possible BOUNDARY | "(" // priority to comment inclusion of calling production // followed by longer expression BOUNDARY or EOF 4`\t octets_beginCProduction_LINKX octets_beginno comment inclusion  FTEXT_WORD | DIGITS | FTEXT_SPECIALS | ":" // so the field alternative can be tested in a look-ahead | OCTET1 | OCTET2 | CRLF // makes a stop before a possible BOUNDARY // followed by longer expression BOUNDARY or EOF 4`\\t optional_fieldCProduction_LINKoptional_field(field_name ":" FWS? unstructured? CRLF orig_dateCProduction_LINK orig_date"Date" ":" date_time CRLF parameterCProduction_LINK\ parameter{{ str sValue; }} ( attribute "=" value[sValue] | "boundary" "=" ( value[sValue] | SKIP // e.g.: ----=_NextPart_000_0023_91_0CD33694.F112A954 is not recognized as TOKEN, because of the '=' {{ sValue = xState.str(); m_iResult = -1; log << "BAD_BOUNDARY" << endl; }} ) {{ str sCrLf = "\r\n"; AddToken(sCrLf + m_sDelimConst + sValue, "BOUNDARY_BEGIN", sValue); AddToken(sCrLf + m_sDelimConst + sValue + m_sDelimConst, "BOUNDARY_END", sValue); PushScope(sValue); m_sBoundary = sValue; }} | "charset" "=" value[sValue] {{ m_sCharset = sValue; }} ) pathCProduction_LINKxpathT FWS? "<" FWS? ( obs_route addr_spec | addr_spec )? ">" FWS? phraseCProduction_LINK|phrase!| "." | FWS entspricht obs_phrase( word FWS? ( word FWS? | "." FWS? )* ptextCProduction_LINKptext hex_octet | safe_char qcontentCProduction_LINKqcontentV QTEXT | QUOTED_PAIR | NON_ASCII {{m_iResult = -1; log << "bad qtext" << endl; }} qp_lineCProduction_LINK qp_lineC(qp_segment transport_padding CRLF )* qp_part transport_padding qp_partCProduction_LINK qp_partMaximum length of 76 characters qp_section qp_sectionCProduction_LINK qp_section=( ( ptext | LWSP_CHAR )* ptext )? qp_segmentCProduction_LINK qp_segmentqp_section LWSP_CHAR* "=" quoted_date_timeCProduction_LINKIquoted_date_time\contents MUST be an RFC 822 `date-time' numeric timezones (+HHMM or -HHMM) MUST be used quoted_string quoted_printableCProduction_LINKquoted_printableqp_line (CRLF qp_line )* quoted_stringCProduction_LINK quoted_string!"\"" FWS? ( qcontent FWS? )* "\""read_date_parmCProduction_LINKbKread_date_parm""read-date" "=" quoted_date_time receivedCProduction_LINKreceivedZ"Received" ":" FWS? name_val_list? ( ";" date_time // ! obs )? CRLF referencesCProduction_LINK referencesZThe obsolete "References:" field differ from the current syntax in that they allow phraseH"References" ":" FWS? msg_id* ( phrase ( msg_id phrase? )* )? CRLF reply_toCProduction_LINKreply_to/ obs mailbox_list is comprised in address_list+"Reply-To" ":" FWS? address_list CRLF resent_bccCProduction_LINK resent_bcc,"Resent-Bcc" ":" FWS? address_list? CRLF resent_ccCProduction_LINK  resent_cc)"Resent-Cc" ":" FWS? address_list CRLF resent_dateCProduction_LINK" resent_date#"Resent-Date" ":" date_time CRLF resent_fromCProduction_LINK$ resent_from+"Resent-From" ":" FWS? mailbox_list CRLF resent_msg_idCProduction_LINK & resent_msg_id"Resent-Message-ID" ":" FWS? ( msg_id | id_left {{ m_iResult = -1; log << "wrong resent msg_id" << endl;}} // e.g. ED80A1E3E2F ) CRLF resent_senderCProduction_LINKP) resent_sender("Resent-Sender" ":" FWS? mailbox CRLF resent_toCProduction_LINKT+ resent_to)"Resent-To" ":" FWS? address_list CRLF return_fieldCProduction_LINKX- return_field"Return-Path" ":" path CRLF safe_charCProduction_LINKC safe_charKany octet with decimal value of 33 through 60 inclusive, and 62 through 126 SAFE_CHAR senderCProduction_LINKEsender!"Sender" ":" FWS? mailbox CRLF size_parmCProduction_LINK M size_parm"size" "=" DIGITS subjectCProduction_LINKGsubject,"Subject" ":" FWS? unstructured? CRLF subtypeCProduction_LINKIsubtype( ITEM_NAME // versuchsweise | _plain // text/plain empirisch | "html" // text/html | _rfc822 // message/rfc822 | "enriched" | "jpeg" | "gif" | "audio" | "basic" | "video" | "mpeg" | "octet-stream" | "PostScript" | "partial" | "external-body" | "mixed" | "alternative" | "parallel" | "digest" ) {{ m_sSubType = xState.str(); }} /* extension_token | iana_token */ textCProduction_LINK0Otextno comment inclusion+ WORD | DIGITS | OCTET3 | OCTET4 | OCTET5 // WORD beginning with a single '\r' or '\n' | CRLF // makes a stop before a possible BOUNDARY | "(" // priority to comment inclusion of calling production // followed by longer expression BOUNDARY or EOF 4`\\t text_typeCProduction_LINKS text_type_text timeCProduction_LINKUtimetime_of_day ZONE time_of_dayCProduction_LINKW time_of_day_HOUR FWS? ":" FWS? MINUTE ( FWS (":" FWS? SECOND FWS? )? | ":" FWS? SECOND FWS? )?toCProduction_LINKYtou"To" ":" FWS? ( address_list | {{ m_iResult = -1; log << "missing To address_list" << endl;}} ) CRLF tokenCProduction_LINK[token71*TOKEN traceCProduction_LINK]tracereturn_field? received*transport_paddingCProduction_LINK_transport_paddingComposers MUST NOT generate non-zero length transport padding, but receivers MUST be able to handle padding added by message transports LWSP_CHAR* typeCProduction_LINK