MSGID / Message-ID Conversion for Fido-Internet Gateways Martin Junius $Revision: 1.1 $ of $Date: 1996/12/22 10:39:34 $ This document describes the conversion between FIDO ^AMSGID/^AREPLY and Internet RFC mail/news Message-ID/References. It is a recommenda- tion for a common handling of message ID passing for FIDONET-Internet gateways. 11.. CCrreeddiittss This work is not entirely mine. It includes suggestions and improvements by +o Joerg Stattaus mailto:Joerg_Stattaus@ac.maus.de +o Albi Rebmann mailto:albi@life.sub.org +o Michael Holzt mailto:Michael_Holzt@mhs.ftg.donut.ruhr.com +o Martin Horneffer mailto:Martin_Horneffer@ac2.maus.de +o Johann H. Addicks mailto:J.H.ADDICKS@BLUEBOCS.donut.ruhr.com +o Jason Fesler mailto:jfesler@wmeonlin.sacbbx.com +o Odinn Sorensen mailto:odinn@winboss.dk 22.. FFoorrmmaattss 22..11.. FFTTNN ^^AAMMSSGGIIDD KKlluuddggee FFoorrmmaattss 22..11..11.. FFTTNN ggeenneerriicc ^AMSGID: anything abcd1234 22..11..22.. IInntteerrnneett ^AMSGID: abcd1234 22..22.. RRFFCC MMeessssaaggee--IIDD FFoorrmmaattss 22..22..11.. FFTTNN ww//oo MMSSGGIIDD Message-ID: 22..22..22.. FFTTNN ggeenneerriicc Message-ID: 22..22..33.. IInntteerrnneett Message-ID: 33.. NNoonn--FFIIDDOONNEETT FFTTNNss A gateway _m_u_s_t use fidonet.org for Message-IDs originating from the standard FIDONET zones 1-6. However, for non-FIDONET zones, a gateway may use a more appropiate Internet domain. Of course, it is essential that multiple gateways for one FTN zone/domain use the _s_a_m_e Internet domain for gated Message- IDs!!! Of course, there may be different Internet domains for the sender's address (From header), but for Message-IDs a unique Internet domain for each gated FTN zone/domain is _m_a_n_d_a_t_o_r_y. 44.. CCoonnvveerrttiinngg FFTTNN ^^AAMMSSGGIIDD ttoo RRFFCC MMeessssaaggee--IIDD Converting ^AREPLY works the same way, using References for news or In-Reply-To for mail. 44..11.. FFIIDDOO mmeessssaaggeess wwiitthhoouutt ^^AAMMSSGGIIDD Some FIDO messages do not contain a unique ^AMSGID. In this case it is necessary to generate a Message-ID which is the same for all gateways. (Otherwise dupes on the Internet side cannot be detected.) The proposed method works as follows: for each message without a MSGID the `id' part of Message-ID is composed of the string "NOMSGID_", the FTN sender address Z:N/F.P using MIME-style quoted printables for `:', `/' as in 3.3, the string "_", the date of the message formatted as "YYMMDD_HHMMSS" (year month day, hour minute second), the string "_", and a CRC32 over the concatenation of the FIDO headers From, To, and Subject. +o The FTN sender address is taken from the origin line (EchoMail) or the message header + ^AINTL/FMPT/TOPT (NetMail). A node address must include the `.0'. +o The date is taken from the date field in the message header. +o The CRC value is computed using the same polynomial and method as specified in section 6. The `do.main' part is the Internet domain appropiate for this FTN (fidonet.org for FIDONET zone 1-6). Examples: FIDO-Message From: Martin Junius @ FIDO 2:242/6.1 To: Test User @ FIDO 2:242/6 Subject: Nur ein Test Date: 06 Dec 92 22:22:00 --> Message-ID: FIDO-Message From: Martin Junius @ FIDO 2:2452/110 To: Test User @ FIDO 2:2452/111 Subject: Nur ein Test Date: 05 Jan 95 11:23:32 --> Message-ID: 08cfe072 = CRC32("Martin Junius" + "Test User" + "Nur ein Test") PROBLEMS: message with the same date and subject, e.g. robot mails or split mails, will get the same Message-ID and therefore be trashed by the news dupe check. 44..22.. FFTTNN MMSSGGIIDD wwiitthh IInntteerrnneett IIDD ^AMSGID: abcd1234 --> Message-ID: If the origin address part of MSGID is a valid RFC Message-ID `<*@*>', then it is directly used for the RFC Message-ID. If `' is quoted according to the FTS-0009 specs ("..."), these quotes must be removed and double quotes ("") reduced to a single one. 44..33.. GGeenneerriicc MMSSGGIIDD CCoonnvveerrssiioonn This procedure may be used for all FIDO-style and unknown MSGIDs. ^AMSGID: anything abcd1234 --> Message-ID: `anything' is converted to `mimeanything' using the following rules (see also the Q encoding specified in RFC1522): +o ` ' (space) is converted to `_' (underscore) +o Any character not allowed in RFC822 atoms (except `.'), `/', `=' and `_' (meaning control chars < 0x20, ()<>@,;:"[]/=_ and chars >= 0x7f) are converted to a MIME-style quoted printable `=XX' where XX is the hex ASCII character code (upper case). +o All other characters are left as is. `ftn.domain' must be the appropiate Internet domain (fidonet.org for FIDONET zone 1-6). If `anything' is a string quoted with "...", these quotes and any quotes within the string are kept as `=22'. Examples: ^AMSGID: 2:2452/110.1@FIDONet abcd1234 --> Message-ID: ^AMSGID: 242:1000/1.1 abcd1234 --> Message-ID: ^MSGID: "some "" junk" abcd1234 --> Message-ID: 55.. RRFFCC MMeessssaaggee--IIDD ttoo FFTTNN MMSSGGIIDD CCoonnvveerrssiioonn 55..11.. NNOOMMSSGGIIDD MMeessssaaggee--IIDDss Any Message-ID starting with is NOT converted back to an FTN ^AMSGID or ^AREPLY! 55..22.. NNoorrmmaall MMeessssaaggee--IIDDss Message-ID: --> ^AMSGID: abcd1234 RFC Message-IDs are converted by putting the entire string into the origin address part of FTN MSGID and adding a hex serial number. +o For EchoMail, the `abcd1234' hex number is a checksum computed for the concatenation of the Message-ID string and the FTN area name (upper case letters). abcd1234 = CRC32("" + "AREA") +o For NetMail the hex number is just the checksum computed for the Message-ID string. abcd1234 = CRC32("") If the Message-ID contains the characters ` ' (space) or `"', the `' string must be quoted using "..." according to FTS-0009. Any `"' within this string must be doubled. Putting the area name into the CRC32 value generates different MSGIDs for different areas, preventing nopes, if the FTN tosser does dupe checking on a global basis. Examples: Message-ID: <1991Aug9.034239.10837@bisun.nbg.sub.org> FTN Area: DE.COMM.GATEWAYS --> ^AMSGID: <1991Aug9.034239.10837@bisun.nbg.sub.org> 9dc743f7 Message-ID: FTN Area: GATEWAYS.GER --> ^AMSGID: 22f000eb Message-ID: FTN Area: JUNK --> ^AMSGID: "" 22a75d09 55..33.. CCoonnvveerrtteedd FFTTNN MMeessssaaggee--IIDDss Message-ID: --> ^AMSGID: anything abcd1234 Reversing the rules of 3.3: +o `_' is converted to ` ' (space). +o `=XX' is converted to the character with hex code XX. Examples: Message-ID: --> ^AMSGID: 2:2452/110.99 fedcba98 66.. SSpplliittttiinngg MMeessssaaggeess Due to the limitation of some FTN programs, it is necessary to split messages larger than 16K (to be on the safe side, 13-14K is a reasonable value for the max. size of the message _body_) when gating to FTN. To prevent messages from vanishing in the bit bucket, the ^AMSGID must be different for the split parts. Due to the brain damage of most FTN dupe checkers it's also necessary to modify the subject line. The proposed technique is to increment the `abcd1234' hex number by 1 for subsequent messages, i.e. the value computed as above for part 1, +1 for part 2, +2 for part 3, and so on. The hex number in ^AREPLY is not modified. The subject of part 1 is unmodified, for subsequent parts the part number is prepended to the subject, string "nn: ". To indicate the splitting, a ^ASPLIT kludge according to FSC-0047 is used before the first line of the message body part: ^ASPLIT: date time @net/node nnnnn pp/xx +++++++++++ e.g. ^ASPLIT: 30 Mar 90 11:12:34 @494/4 123 02/03 +++++++++++ There is exactly one empty line after the message body part, before the "---" tear line or the first ^AVia line. Example: Subject: This is a 3 part message Message-ID: FTN Area: GATEWAYS.GER --> Subj: This is a 3 part message ^AMSGID: 22f000eb ^ASPLIT: 30 Mar 90 11:12:34 @494/4 00000 01/03 +++++++++++ Subj: 02: This is a 3 part message ^AMSGID: 22f000ec ^ASPLIT: 30 Mar 90 11:12:34 @494/4 00000 02/03 +++++++++++ Subj: 03: This is a 3 part message ^AMSGID: 22f000ed ^ASPLIT: 30 Mar 90 11:12:34 @494/4 00000 03/03 +++++++++++ 77.. CCoommppuuttiinngg CCRRCC3322 vvaalluueess The CRC32 value is computed using the polynomial +o X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 a start value of 0xffffffff and XORing the result with 0xffffffff (same as in ZModem and ZIP). The resulting value is printed using an 8 digit hex number with lower case letters a-f.