mac@dit.upm.es (Manuel Alvarez-Campana Fernandez-Corredor) (11/14/90)
As part of a national R&D project, the DIT (Departamento de Ingenieria elematica) at "Universidad de Madrid" developed an RFC-822 <-> X.400 gateway based on RFC-987. One of the main blocks of this gateway is the address converter. Based on this converter, we have generated a tool for conversion between RFC-822 and X.400 addresses wich we offer to anyone who may be interested. The main points of this program are: - It can be used just as a command to obtain the equivalent address of a given one. - It can be also used as part of an RFC-987 gateway. An equivalent structure in C language for ORNames makes easier to interface this software to a gateway. - IT SUPPORTS REPRESENTATIONS of addresses (defined in RFC-987) which can be useful for increasing the funcionality of a gateway. - BUT IT DOESN'T GENERATE REPRESENTATIONS of addresses (conforming CEN/CENELEC profiles). It only generates addresses in the format that the user of the destination mail system is familiar with. - Uses conversion tables with the format defined in RFC-987. A tool wich converts from the RARE format to the RFC-987 format is also available. - Performs the needed character conversion (local-part <-> ascii <-> printable string). USAGE OF THE PROGRAM ==================== The usage is: ~> mac [-t | -u ] The program can work in normal or test modes. The test mode (option -t), performs a double mapping which permits to know how the address would be reversed. Option -u means that the character conversion from ascii to local-part will be performed if necesary in order to avoid quoting. EXAMPLES: ======== Following we provide several examples that can give you an idea of how the address converter works (I've added some comments in this message, lines starting with '#' ): Consider the next file as input: ###################### rfc822 addresses ####################### # GivenName.Initials.Surname@doms Manuel.A.Campana@dit.upm.es # x400 represented in rfc822; note also that '_' becomes ' ' /C=es/ADMD=_/PRMD=iris/O=upm/OU=dit/S=mac/@gtwy.es # x400 represented in rfc822; quoting used "/C=es/ADMD= /PRMD=iris/O=upm/OU=dit/S=mac/"@gtwy.es # partial x400 representation /GQ=Jr/PN=M.A.Campana/@nar400.dit.upm.es # character conversion M_Alvarez@nar400.dit.upm.es # the same with quotes "M Alvarez"@nar400.dit.upm.es ###################### X.400 addresses ####################### # GivenName.Initials.Surname@doms c=es;admd= ;prmd=iris;o=upm;ou=dit;s=Campana;g=Manuel;i=A; # rfc822 represented in x.400; note (a) --> @ c=es;admd= ;prmd=iris;o=gtwy;rfc-822=mac(a)dit.upm.es; ############################################################### Now, we invoke the program with the option -t (test): ~> mac -t < input >output And here is the file "output" RFC-987 address translator; (C) DIT-ETSIT-UPM; Oct 18, 1990 ###################### rfc822 addresses ####################### # GivenName.Initials.Surname@doms << RFC-822: Manuel.A.Campana@dit.upm.es >> X.400: C=es;ADMD= ;PRMD=iris;O=upm;OU=dit;S=Campana;G=Manuel;I=A; >> RFC-822: Manuel.A.Campana@dit.upm.es # x400 represented in rfc822; note also that '_' becomes ' ' << RFC-822: /C=es/ADMD=_/PRMD=iris/O=upm/OU=dit/S=mac/@gtwy.es >> X.400: C=es;ADMD= ;PRMD=iris;O=upm;OU=dit;S=mac; >> RFC-822: mac@dit.upm.es # x400 represented in rfc822; quoting used << RFC-822: "/C=es/ADMD= /PRMD=iris/O=upm/OU=dit/S=mac/"@gtwy.es >> X.400: C=es;ADMD= ;PRMD=iris;O=upm;OU=dit;S=mac; >> RFC-822: mac@dit.upm.es # partial x400 representation << RFC-822: /GQ=Jr/PN=M.A.Campana/@nar400.dit.upm.es >> X.400: C=es;ADMD= ;PRMD=iris;O=upm;OU=dit;OU=nar400;S=Campana;I=MA;GQ=Jr; >> RFC-822: M.A.Campana@nar400.dit.upm.es # character conversion << RFC-822: M_Alvarez@nar400.dit.upm.es >> X.400: C=es;ADMD= ;PRMD=iris;O=upm;OU=dit;OU=nar400;S=M Alvarez; >> RFC-822: "M Alvarez"@nar400.dit.upm.es # the same with quotes << RFC-822: "M Alvarez"@nar400.dit.upm.es >> X.400: C=es;ADMD= ;PRMD=iris;O=upm;OU=dit;OU=nar400;S=M Alvarez; >> RFC-822: "M Alvarez"@nar400.dit.upm.es ###################### X.400 addresses ####################### # GivenName.Initials.Surname@doms << X.400: c=es;admd= ;prmd=iris;o=upm;ou=dit;s=Campana;g=Manuel;i=A; >> RFC-822: Manuel.A.Campana@dit.upm.es >> X.400: C=es;ADMD= ;PRMD=iris;O=upm;OU=dit;S=Campana;G=Manuel;I=A; # rfc822 represented in x.400; note (a) --> @ << X.400: c=es;admd= ;prmd=iris;o=gtwy;rfc-822=mac(a)dit.upm.es; >> RFC-822: mac@dit.upm.es >> X.400: C=es;ADMD= ;PRMD=iris;O=upm;OU=dit;S=mac; ############################################################### -- .-----------------------------.--------------------------------. | Manuel Alvarez-Campana | EUnet: | | Dept. Ingenieria Telematica | mac@dit.upm.es | | ETSIT - UPM | X.400: | | Ciudad Universitaria s/n | C=es;ADMD= ;PRMD=iris;O=upm; | | 28040 - MADRID | OU=dit;OU=cactus;SUR=mac; | `--------------------------------------------------------------'