Network Working                                           C. Allocchio
Group                                                       GARR-Italy
INTERNET-DRAFT                                                May 1998
                                               Expires:  November 1998
                                  File: draft-ietf-fax-fulladdr-00.txt




         GSTN address element extensions in e-mail services
                              v3.10



Status of this Memo

This document is an Internet Draft.  Internet Drafts are working
documents of the Internet Engineering Task Force (IETF), its Areas,
and its Working Groups.  Note that other groups may also distribute
working documents as Internet Drafts.  Internet Drafts are draft
documents valid for a maximum of six months.  Internet Drafts may be
updated, replaced, or obsoleted by other documents at any time.  It is
not appropriate to use Internet Drafts as reference material or to
cite them other than as a Òworking draftÓ or Òwork in progressÓ.
Please check the I-D abstract listing contained in each Internet Draft
directory to learn the current status of this or any other Internet
Draft.


1. Introduction

   The possible elements composing a ÒGlobal Switched Telephone Network
   (GSTN) address in e-mailÓ (formerly known also as Public Switched
   Telephone Network - PSTN) can vary from a minimum number up to a
   really large and complex collection: the minimal format and general
   address syntax are defined in [1], together with the syntax to define
   additional address elements.

   To ensure interoperability among different applications, also the
   additional, and in most cases optional, address elements MUST be
   defined in a standard syntax. In this memo we define some of these
   additional address elements:

     - the detailed definition of GSTN number formats, in order to cover
       all the possible and different GSTN numbering schema (gstn-phone,
       sub-addr-spec and post-dial)

     - the intended message recipient specification (pstn-recipient)

   The definitions included in this memo always superset the minimal
   profile defined in [1].

   Other specifications using GSTN address in e-mail CAN also define
   additional service specific address elements (see for example ÒT33SÓ
   element in reference [2]), but they MUST use definitions contained in
   this memo for those elements already specified here.

   Even if in this memo we focus on e-mail addresses, a number of elements
   defined in this specification can also be used for other specifications
   dealing with embedding GSTN addresses into other addresses: for example
   there is some work in progress about URLs specification which adopts
   similar definitions, with slight changes in the global syntax due to
   specific URL format.

   Finally, in this memo we try to mantain maximum compatibility
   with existing e-mail gateway services and standard specifications.
   In particular we will use as much as possible compatible definitions
   with MIXER [3] gateways specifications, in order to facilitate
   transparent e-mail address translations without unduly complex mappings.

   In this document the formal definitions are described using ABNF
   syntax, as defined into [4]. We will also use some of the "CORE
   DEFINITIONS" defined in "APPENDIX A - CORE" of that document. The
   exact meaning of the capitalised words

      "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
      "SHOULD NOT", "RECOMMENDED",  "MAY", "OPTIONAL"

   is defined in reference [5].


2. GSTN extended number and pstn-mbox extended format

   In reference [1], section 2, the minimal definition of pstn-mbox
   includes the global-phone element, and further details are defined
   in [1] section 2.1.

   However other non global-phone numbering schema are allowed, too.
   In order to describe these more general schema, we thus expand the
   scenario defining the GSTN extended number format:

      gstn-phone = ( global-phone / local-phone )

   The complexity of the GSTN system includes also the optional use of
   subaddresses and post dialling sequences. As a consequence the extended
   definition of pstn-mbox becomes:

      pstn-mbox = service-selector "=" gstn-phone
                 [ sub-addr-spec ] [post-sep post-dial]

   NOTE: see section 3 in case multiple sub-addr-spec per pstn-mbox need
         to be specified.


2.1 The local-phone syntax

   The local-phone element can be used to represent all possible cases
   where the global-phone does not apply. In order to cover all possible
   different and complex conventions in use in the GSTN system, the
   local-phone definition allows a large number of elements. Please
   note that local-phone CANNOT start with a Ò+Ó sign, as this is
   reserved for global-phone definition.

   We now define in details local-phone:

      local-phone = [ exit-code ] [ dial-number ]

      exit-code = phone-string
                  ; this include anything needed to enable dialling, like
                  ; the digit to access outside line, the long distance
                  ; carrier access code, the access password to the service,
                  ; etc...


      dial-number = phone-string
                  ; this is in many cases composed of different elements
                  ; like the local phone number, the area code (if needed),
                  ; the international country code (id needed), etc...

      phone-string = 1*( DTMF / pause / tonewait / written-sep )

      DTMF = ( DIGIT / "#" / "*" / "A" / "B" / "C" / "D" )
                     ; special DTMF codes like "*", "#", "A", "B",
                     ; "C", "D" are defined in [6]
                     ; Important Note: this is NOT the alpha to digit
                     ; convention in use in some countries.

      pause = ( "p" / "P" )

      tonewait = ( "w" / "W" )


   NOTE: "pause" and "tonewait" character interpretation in local-phone numbers
         depends on the specific MTA implementation. Thus its exact meaning
         need not to be defined here.

   The written-sep is defined in [1], section 2.1; other specification for
   some particular services (like for example voice messaging service) CAN
   allow additional separators. Their definition MUST be detailed into
   the documents defining the addressing for the specific service.

   Important Note:
         A local-phone specification is a sequence which should be dialled
         by the MTA specified by mta-I-pstn (see [1], section 3) to reach
         the destination device. Other MTAs should only transfer the message
         around without modification until the destination MTA is reached.
         However, this implementation scenario is extremely complex and full
         discussion of it is outside the scope of this document.


2.2 The sub-addr-spec element

   In GSTN service there are cases where a sub-addr-spec is required to
   specify the final destination. In particular there are ISDN subaddresses
   [7], which apply to all possible services, while other types are
   limited to specific services (see the fax service T.33 subaddress [8],
   [2]).

   We must thus be able to specify at least the ISDN subaddress, remembering
   that an ISDN subaddress could be supplemented by other subaddress types
   (like a T.33 subaddress).



   As a consequence, the definition of sub-addr-spec is:

      sub-addr-spec = [ isdn-sep sub-addr ]

   In detail:

      isdn-sep = "/ISUB="
                 ; note that "/ISUB=" is case INSENSITIVE

      sub-addr = 1*( DIGIT / written-sep )


2.3 The post-dial element

   In some cases, after the connection with the destionation GSTN
   device has been established, a further dialling sequence can be
   required to access further services; a typical example are the
   automated menu-driven services using DTMF sequences on the
   telephone services. These sequences are defined as a separator
   and a post dial sequence:

      post-sep =  "/POSTD="
                  ; note that "/POSTD=" is case INSENSITIVE

      post-dial = phone-string

   A number of gstn-phone examples are listed in section 4


3. The pstn-recipient

   The pstn-mbox element is sometimes not enough to specify additional
   details, like intended recipient name, physical address, etc.
   The optional pstn-recipient element provides information which could
   also be used by the offramp gateway to specify the recipient exactly.
   As an example, when an offramp fax gateway is involved, the
   pstn-recipient element could be used to specify the intended recipient
   on a fax cover page.

   The pstn-recipient is a sequence of qualif-type1 elements, as defined
   in [1], section 2:

      pstn-recipient = [ recipient-name ]
                       [ 1*( recipient-qualifier ) ]

3.1 The recipient-name

   The recipient-name specifies the personal name of the intended
   recipient, and is defines in two equivalent forms:

      recipient-name = ( personal-type1 / personal-type2 )

      personal-type1 = "/PN="
                       [ givenname "." ]
                       [ initials "." ]
                       surname
                       ; this is compatible with ITU F.401 [9] [10]

      personal-type2 = [ "/G=" givenname ]
                       [ "/I=" initials ]
                       "/S=" surname
                       ; this is compatible with ITU F.401 [9] [10]


   The following definitions come directly from MIXER specification [3]:

      surname = printablestring

      givenname = 1*( DIGIT /  ALPHA / SP / "'" / "+" /
                    "," / "-" / "/" / ":" / "=" / "?" )

      initials = 1*ALPHA


   NOTE: the two possible formats of recipient-name are both in
         common use. Implementations SHOULD accept both, but
         MUST generate personal-type1 only.


3.2 The extensible recipient-qualifier

   The recipient-name is sometimes not enough to specify completely the
   intended recipient. An set of elements is thus defined:

      recipient-qualifier = ( qualif-type1 / qualif-type2 )

   The recipient-qualifier is a qualif-type1 element, and contains
   a qualif-type1 element in a recursive definition which allows an
   extensible format. However we define at least a number of these
   elements, calling them Òqualif-type2Ó

      qualif-type2 = "/" x400-label "=" printablestring

      x400-label = ( "GQ" / "O" / "OU1" / "OU2" / "OU3" / "OU4" /
                     "P" / "A" / "C" / "PD-PN" / "PD-EA" / "PD-ED" /
                     "PD-OFN" / "PD-OF" / "PD-O" / "PD-S" / "PD-A" /
                     "PD-U" / "PD-L" / "PD-R" / "PD-B" / "PD-PC" /
                     "PD-SN" / "PD-C" / "X121" / "E164" / "PSAP" /
                     "N-ID" / "T-ID" / "T-TY" / "DD." dd-key )
                    ; this is the full list of existing text labels
                    ; according to ITU F.401 [10] [11]. "PD-x" labels
                    ; provide a set of predefined attributes for physical
                    ; delivery which can be also useful for message
                    ; recipient identification.

      dd-key = 1*( DIGIT / ALPHA / "-" )
               ; note that SP (space) is not allowed in dd-key

      NOTE: the use of Domain Defined Attributes "DD." dd-key, although
            allowed by ITU specifications, is anyhow DEPRECATED in this
            context. Implementations MUST accept them, but SHOULD NOT
            generate this element.

      string = PCHAR
               ; note that printable characters are %x20-7E

      printablestring = 1*( DIGIT / ALPHA / SP /
                            "'" / "(" / ")" / "+" / "," / "-" /
                            "." / "/" / ":" / "=" / "?" )
                        ; this definition comes from ITU F.401 [9]
                        ; and MIXER [3]

   We briefly describe in Table 1 the meaning of x400-label fields (for a
   complete description refer to [9], Annex B):


                        Table 1 - x400-label

   x400-label  Description
   -----------------------------------------------------------------
      "GQ"     Generation Qualifier (e.g. "Jr", "Sr", "II", ...)

       "O"     Organization Name (name of the organization)

     "OU1"     Organization Unit 1 Name (name of the internal
               Department inside "Organization")

     "OU2"     Organization Unit 2 Name (name of the sub-department
               inside "OU1")

     "OU3"     Organization Unit 3 Name (name of the sub-department
               inside "OU2")

     "OU4"     Organization Unit 4 Name (name of the sub-department
               inside "OU3")

       "P"     Private Domain Name (name of the X.400 private management
               domain, usually an X.400 management domain in a non public
               environment)

       "A"     Administraion Domain Name (name od the X.400 public
               management domain, usually a public X.400 service provider)

       "C"     Country Code (two character counrty code, ISO 3166)

    "X121"     X.121 Address (numeric network address of the recipient MTA,
               usually an X.25 address)

    "E164"     E.164 Address (numeric GSTN address of the recipient MTA)

    "PSAP"     PSAP Address (numeric network address of the recipient MTA,
               an OSI numeric address)

    "N-ID"     User Agent Numeric Id (numeric address of the recipient UA)

    "T-ID"     Terminal Id (numeric address of the recipient phisical
               terminal)

    "T-TY"     Terminal Type (code specifying the recipient terminal type)

    "DD."      Domain Defined Attribute (an extensible element to specify
               address elements specific to the X.400 recipient)

   "PD-PN"     Personal Name for physical delivery

   "PD-EA"     Extension label for postal physical delivery extension
               elements

   "PD-ED"     Extension label for physical delivery address extension
               elements

  "PD-OFN"     Office Number for physical delivery (example: BLD2-44)

   "PD-OF"     Office Name for physical delivery (example: Sales)

    "PD-O"     Organization Name for Physical Delivery (example: ACME Inc)

    "PD-S"     Street address for physical delivery

    "PD-A"     Unformatted postal address for physical delivery

    "PD-U"     Unique postam name for physical delivery (example:
               ACMETELEX)

    "PD-L"     Local postal attrobutes for physical delivery (example:
               Entrance 3, 3rd floor, Suite 296)

    "PD-R"     Restante address for physical delivery

    "PD-B"     Post Office Box for physical delivery

   "PD-PC"     Postal ZIP code for physical delivery

   "PD-SN"     Postal Service Name for physical delivery

    "PD-C"     Country Name for physical delivery
-----------------------------------------------------------------

    In common practice, however, only a limites subset of x400-label SHOULD
    be used, i.e. implementations SHOULD accept any of these elements, but
    SHOULD generate only the subset given hereunder:

      "GQ" / "PD-O" / "PD-OFN" / "PD-OF" / "PD-S" / "PD-A" / "PD-U" /
      "PD-L" / "PD-B" / "PD-PC" / "PD-SN" / "PD-C"

   The above elements are usually enough to exactly specify the intended
   recipient of the message. More over, if the X.400 specific other
   attributes, like "O", "OU1", etc, are specified, they MUST exactly
   follow the correct X.400 syntax of the equivalent real X.400 address of
   the recipent: in fact they will be converted into real X.400 attributes
   if crossing a MIXER gateway.


3. Multiple sub-addr-spec cases

   In case there are multiple sub-addr-spec to be given on the same
   pstn-mbox then multiple pstn-email elements will be used. The UA could
   accept multiple sub-addr-spec elements for the same global-phone /
   local-phone, but it MUST generate multiple pstn-mbox, when passing the
   message to the MTA.


4. Examples

   In order to clarify the specification we present here a limited
   set of examples. Many of the examples refer to the fax service,
   but also additional possible services are included. Check also
   the examples in [1] and [2] for additional information.

4.1 pstn-mbox examples

   A pstn-mbox address in Italy for the fax service, dialled from
   U.S.A., using local-phone, without sub-addr-spec and without
   written-sep:

     FAX=0103940226338

   A pstn-mbox address in Germany for an hypotetical XYZ service, using
   global-phone, with ISDN sub-addr-spec 1234 and written-sep ".":

     XYZ=+49.81.7856345/ISUB=1234

   A pstn-mbox address in U.S.A. for fax service, using global-phone,
   with T.33 sub-addr-spec 8745, with written-sep "-" and post-dial sequence
   p1w7005393w373

     FAX=+1-202-455-7622/T33S=8745/PostD=p1w7005393w373

   A pstn-mbox address in Italy for fax service, using local-phone,
   dialed from an MTA in Germany, (international access code "00",
   with ISDN subaddress 9823, with T.33 subaddress "4312" and without
   pause or written-sep:

     FAX=003940226338/Isub=9823/T33S=4312

   The same pstn-mbox address in Italy, using local-phone dialed from
   an MTA in Italy (long distance call), with long distant access "0",
   with exit-code "9", T.33 subaddress "4312", pause "p" and written-sep
   ".":

     FAX=9p040p22.63.38/t33s=4312

   A pstn-mbox address in North America for hypotetical service XYZ,
   using global-phone, without sub-addr-spec and written-sep "-" and ".":

     XYZ=+1.202.344-5723


   A pstn-mbox address for fax service in France, using local-phone
   dialed from an MTA in France (long distance call), with exit-code
   "0", T.33 subaddress "3345" and pause "p":

     FAX=0p0134782289/T33s=3345

   A pstn-mbox address for fax service in North America, using local-phone,
   without sub-addr-spec, without local-number, using only post-dial
   sequences to reach numbers stored in a locally defined short-dial numbers
   database, where 6743 is an access password, and 99p51 is the sequence to
   access the local short-dial number:

     FAX=/postd=w6743w99p51


4.2 pstn-recipient examples

   Here are a number of pstn-recipient examples. Please note that
   pstn-recipient is just an optional element, and thus a pstn-mbox
   element also is required in a pstn-address.

   A pstn-recipient using only recipient-name of personal-type1,
   with givenname initials and surname:

     /PN=Tom.J.Smiths

   A pstn-recipient using only recipient-name of personal-type1,
   with givenname and surname:

     /PN=Mark.Collins

   A pstn-recipient using only recipient-name of personal-type2,
   with surname only:

     /S=Smiths

   A pstn-recipient using recipient-name of personal-type1, and
   one recipient-qualifier element:

     /PN=J.Smiths/OU1=Quaility-control

   A pstn-recipient using two recipient-qualifier extension, only:

     /PD-ON=T2-33A/OU1=Q-C

   A fax-reciepint using some recipient-quelifier extension derived from
   ITU F.401 physical delivery label set:

     /PD-S=Main.Street/PD-SN=45/PD-OF=Sales.dept


4.3 pstn-address examples

  Some pstn-address examples, obtained combining elements from
  previous examples. There are complete addresses which can
  be used as "local part" (LHS) element of an e-mail address.

  Without optional pstn-recipient (fax service):

     FAX=+12023445723

  With pstn-recipient of personal-type1 (XYZ service):

     XYZ=+3940226338/PN=Mark.Collins

  With pstn-recipient made of two recipient-qualifier extensions
  (fax service):

     FAX=9p040p22.63.38/t33s=4312/PD-ON=T2-33A/OU1=Q-C


4.4 pstn-email examples

  Here are the same addresses as before, where "faxgw" is the
  mta-I-pstn field for the fax service.

     FAX=+12023445723@faxgw

     FAX=+39-40-226338/PN=Mark.Collins@faxgw

     FAX=9p040p226338/T33S=4312/PD-ON=T2-33A/OU1=Q-C@faxgw

     FAX=+3940226338/PN=Mark.Collins/@faxgw

  NOTE: the optional "/" in front for the "@" sign can be generated
        by gateways to other services, like MIXER [3].


4.5 A complete SMTP transaction example:

  Here is an example of complete SMTP transaction.

    S: <listening on SMTP port>
    C: <opens connection to SMTP port>
    S: 220 foo.mailfax.com ESMTP service ready
    C: EHLO pc.mailfax.com
    S: 250 foo.mailfax.com says hello
    C: MAIL FROM:<tom@mailfax.com>
    S: 250 <tom@mailfax.com> Sender ok
    C: RCPT TO:<FAX=+3940226338@foo.mailfax.com>
    S: 250 <FAX=+3940226338> recipient ok
    C: DATA
    S: 354 Enter your data
    C: From: Thomas Blake <tom@mailfax.com>
    C: To: <FAX=+3940226338@foo.mailfax.com>
    C: Subject: Hello there
    C: MIME-version: 1.0
    C: Date: Mon, 01 Sep 1997 18:14:23 -0700
    C: Content-Type: multipart/mixed; boundary=16820115-1435684603#2306
    C:
    C: This is a MIME message. It contains a
    C: TIFF fax bodypart
    C:
    C: --16820115-1435684603#2306
    C: Content-Type: image/TIFF
    C: Content-Tranfer-Encoding: BASE64
    C: Content-Description: FAX
    C:
    C: ABAA745HDKLSW932ALSDL3ANCVSASDFLALSDFA
    C: 87AASS2999499ASDANASDF0000ASDFASDFNANN
    C: 87BBHDXBADS00288SADFNAZBZNNDNNSNNA11A0
    C: H8V73KS0C8JS6BFJEH78CDWWDUJEDF7JKES8==
    C: --16820115-1435684603#2306--
    C: .
    S: 250 Okay
    C: QUIT
    S: 221 Goodbye


6. Conclusion

   This proposal creates a standard set of extensions for GSTN addresses,
   enriching the existig minimal specification [1]. The proposal requires
   no changes to existing e-mail software, and allows a more detailed
   address specification, including per recipient specific elements.


7. Security Considerations

   This document specifies a means by which GSTN addresses can be
   encoded into e-mail addresses. As routing of e-mail messages is
   determined by Domain Name System (DNS) information, a succesful
   attack on this service could force the mail path via some particular
   gateway or message transfer agent where mail security can be
   affected by compromised software.

   There are several means by which an attacker might be able to
   deliver incorrect mail routing information to a client. These
   include: (a) compromise of a DNS server, (b) generating a
   counterfeit response to a client's DNS query, (c) returning
   incorrect "additional information" in response to an unrelated
   query. Clients SHOULD ensure that mail routing are based only
   on authoritative answers. Once DNS Security mechanisms [7]
   become more widely deployed, clients SHOULD employ those mechanisms
   to verify the authenticity and integrity of mail routing records.

   Some GSTN service require dialing of private codes, like Personal
   Identification Numbers, to access special services. As e-mail
   addresses are transmitted without encoding over the MTAs transport
   service, this could allow unauthorized people to gain access to
   these codes when used inside local-phone. Use of double key
   encryption techniques for local-phone can solve these security
   problem.


8. Copyright

   "Copyright (C) The Internet Society (date). All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implmentation may be prepared, copied, published and
   distributed, in whole or in part, without restriction of any kind,
   provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the  purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be followed,
   or as required to translate it into languages other than English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
   NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL
   NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
   FITNESS FOR A PARTICULAR PURPOSE."


9. Author's Address

   Claudio Allocchio
   Sincrotrone Trieste
   SS 14 Km 163.5 Basovizza
   I 34012 Trieste
   Italy

   RFC822: Claudio.Allocchio@elettra.trieste.it
   X.400:  C=it;A=garr;P=Trieste;O=Elettra;
           S=Allocchio;G=Claudio;
   Phone:  +39 40 3758523
   Fax:    +39 40 3758565


10. References

[1]  Allocchio, C., "Minimal PSTN address format in Internet Mail",
     RFC 2303, March 1998.

[2]  Allocchio, C., "Minimal FAX address format in Internet Mail",
     RFC 2303, March 1998.

[3]  Kille, S., "MIXER (Mime Internet X.400 Enhanced Relay): Mapping
     between X.400 and RFC 822/MIME", RFC 2156, January 1998.

[4]  Crocker, D. and P. Overell, "Augmented BNF for Syntax
     Specifications", RFC 2234, November 1997.

[5]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
     Levels", RFC 2119, March 1997.

[6]  ETSI I-ETS 300,380 - Universal Personal Telecommunication (UPT): Access
     Devices Dual Tone Multi Frequency (DTMF) sender for acoustical coupling
     to the microphone of a handset telephone (March 1995)

[7]  ITU E.164 - Numbering plan for the ISDN era; recommendation E.164/I.331
     (August 1991)

[8]  ITU T.33 - Facsimile routing utilizing the subaddress; recommendation
     T.33 (July, 1996)

[9]  ITU F.401 - Message Handling Services: Naming and Addressing for Public
     Massage Handling Service; reccommendation F.401 (August 1992)

[10] ITU F.423 - Message Handling Services: Intercommunication Between the
     Interpersonal Messaging Service and the Telefax Service; reccommendation
     F.423 (August 1992)