.enable bar .style headers 6,0,0 .ap.p 0 .title Queued Mail System -- Design Specification .subtitle Introduction .date .lm 0.rm 72 .c;Queued Mail System (QMS) .b2.c;Version 1.0 .b2.c;Design Specification .flag substitute .b2.c;$$DATE .noflag substitute .b5 .ts20 .lm 20 .i-15 Issued by: Robert C. McQueen .b2 .i-15 Project team: Robert C. McQueen .br;Sally D. Goldman .br;Keith J. Heilner .br;Antonino N. J. Mione .br;David L. Stevens .lm0 .page .require "QMS_ds.rnt" .page .hl1 Introduction The mail system on the VAX/VMS systems is primitive. The user agent (MAIL program) does not allow you many of the options that are found in the MM-20 and MS-10/20 mail user agents and the transfer agent doesn't allow multiple network support very easily. This project will be the first step in producing a new electronic mail environment for the VAX/VMS systems. The initial step will be to provide a mail transport system that can .bb be used as a basis for future functionality. .eb .hl1 Revision History The following is the revision history for the mail system design document. All changes from the previous version are noted by change bars. .ls "o" .le;Preliminary version. .le;Second preliminary version. .bb .le;Third preliminary version. .eb .els .hl1 Mail Transfer Agent The mail transfer Agent will be organized around three different sets of output symbionts. These symbionts will handle the three basic parts of the MTA; incoming messages, delivery dispatching and outgoing messages. .HL2 Incoming Servers There will be a different incoming server for each network protocol that is supported. The initial support will be for DECnet and TCP/IP (CMU ACP). The DECnet support will be arranged around two different mail protocols, MAIL-11 and SMTP. All servers will do the following: .ls .le;Open the network connection. .le;Validate (if possible) that the connection is from a valid remote MTA. .le;Start the network protocol .le;As recipients are determined, do minimal validation on local recipients. .le;If the mail message is received correctly, the mail message will be entered into the mail delivery queue. .le;Reset if possible to process more than one incoming mail message at a time. This is protocol specific. .le;Exit upon completion of mail delivery. .els The following are the mail servers and what they support. .hl3 MX-SERVER This will support DECnet connections from the MX MTA found on the DECsystem-10s and the DECSYSTEM-20s. The mail protocol supported will be SMTP. .BB .HL3 MM-SERVER .EB This image will support DECnet connections from the older MM MTA found on DECSYSTEM-20s. This image will also support the SMTP mail protocol. .HL3 MAIL11-SERVER This image will support the DECnet MAIL-11 mail protocol. It will support the protocol on the standard DECnet object assigned to mail. .BB .HL3 INTERNET-SERVER .EB This image will support the TCP/IP SMTP mail protocol. .HL2 Message router The MAIL-ROUTER process will handle the following functions: .ls .le;Expansion of distribution lists .le;Placement of mail into the proper outgoing queue. .le;Message header munging for gatewayed mail (?) .els .hl2 Outgoing servers There will be one outgoing server for each type of network protocol that is to be handled. Each network server must be able to sent multiple protocols, since it is unknown what can be handled by the remote system until an attempt to connect to a remote server is attempted. All servers will handle an outgoing mail message in the following manner: .ls .le;Build a list of the recipients grouped by node. .le;Attempt to connect to a network node. .le;If connected, send the mail message to that network node. .le;Remove recipients from the recipient list as they successfully receive the mail message. .le;Shut down the network connection to that node after the message is transfered. .le;Advance to next group of recipients. .le;If there was a next group, loop back to the second step and connect to the network node. .le;If the recipient list is not null queue a new message. .le;Release this mail message. .els An error mail message will be queued to the orginator of the mail message for any errors encountered in the attempted delivery. .hl3 LOCAL-DELIVERY The local delivery process will be responsible for the delivery of local mail. The local delivery could be to more than one local user agent, but in the initial implementation it will be only to VAXmail. .HL3 DECNET-DELIVERY The DECNET-DELIVERY process will handle handle two mail delivery protocols: MAIL-11 and SMTP. The MAIL-11 protocol will contect to the standard DECnet object for MAIL-11, while the SMTP will use the MM object or the MX-LISTENER task name. Normally, the process will attempt each mail protocol, until a successful connection is made to the remote node. The default can be overridden by a specification in the queue request. .HL3 INTERNET-DELIVERY The INTERNET-DELIVERY process will use the SMTP mail protocol over the TCP/IP network. .hl1 Communication mechanism The communication between the input servers, the delivery process and the outgoing servers will be handled by means of two system queues. These queues will be handled by the normal VAX/VMS job controller. There will be an input mail queue and several output mail queues. The queue names will be: .ls "o" .le;QMS$INCOMING__MAIL - Input queue to the delivery process. Network servers and the local user agent will place requests into this queue. .le;QMS$LOCAL__MAIL - Output queue for locally deliverable mail. .le;QMS$protocol__MAIL - Output queue for a specific protocol (eg. QMS$DECNET__MAIL). .els .hl2 Queue Request Entry The information that will be retained in the job controller data base will be: .ls .le;File Specification - Detailed request information .le;P1 - From address .le;P2 - Mail transport protocol to use .le;P3 - Message File Specification .els .hl2 Detailed Request information The detailed request information will be kept in a file on disk. The information will include all of the information that is kept in the job controller data base plus the recipient list. The information in the file will be record oriented, so a specific record number will contain a specific piece of information. The following is the information and record number: .ls .le;Request version number .le;Warning date/time .le;Wairing delta time .le;Expiration date/time .le;Message File specification .le;From Address .le;Mail transport protocol to use .le;Recipient list .els .hl1 Modules All modules will be written in C when possible. Already completed modules will not be abandoned (eg. SMTP.BLI will not be rewritten). All work that is done on this project should conform to good programming practices: .ls "o" .le;All modules should conform to the code style that is advocated by LSE. This includes commented headers before all routines and indentation. .le;All variables that are used should not be abreviated, for example use "fao__control__string" instead of "faostr". .le;Routines should be grouped into modules by common functionality. .le;A consistant naming convention should be used for routines (eg. net__open, net__read, net__write for network related routines). .els Additionally, this project should utilize the MMS and CMS utilities for the control. .hl2 Module descriptions The following are descriptions of the various modules that make up. .bb .hl3 Main modules .HL4 QMS__ROUTER.C This module will implement the Mail Router process. It will call the various subroutines in the other modules. .hl4 QMS__SMTP__SERVER.C This module will provide the SMTP server support for MX-SERVER, MM-SERVER and INTERNET-SERVER. .HL4 QMS__DELIVER__SYMBIONT.C This module will implement the basic symbiont routines needed for a delivery symbiont. This routine will call another module which will handle the protocol specific functions. .hl3 Symbiont interface .hl4 QMS__SYMBIONT.C This is a general symbiont interface for the QMS mail system. This module will call a processing routine to handle the various tasks that are required to handle a task. .hl3 Protocol Support modules .HL4 SMTP.BLI (existing module) Network independent implementation of the SMTP protocol written in BLISS-32. .HL4 QMS__MAIL11.C Mail-11 protocol implementation. It will be written to utilitize the same low level routines that the SMTP module already utilitizes. .hl3 Support modules .bb .HL4 QMS__GATEWAY.C This module will contain the routines that are used to route a message to a gateway. This module will implement the address mappings that are required to send a message to a remote gateway. .hl4 QMS__LOGGER.C This module will implement the event logging that is required for the SMTP module. This will allow the listing of various transactions into a log file. This would require the mail management software to turn this function on and fully support it. .eb .HL4 QMS__MESSAGE.MSG This module is a MESSAGE source file. It will define all of the condition codes that are used in the QMS modules. .HL4 QMS__PARSE__ADDRESS.C This module will parse an address. .HL4 QMS__VALIDATE.C Validate an address as local. This module would validate users, distribution lists. Possible future support would be automatic rerouting of "Stevens" mail to the proper network mailbox. .HL4 QMS__DISTR__LIST.C This module would handle the processing of distribution lists. This includes lookup, expansion, etc. .HL4 QMS__ERROR__MAIL.C This module handle the creation of mail generated because of a delivery problem. A delivery problem could be expiration timer for connecting to a network node, distribution list expansion failure, etc. .HL4 QMS__LISTS.C This module will contain basic routines to processing of lists. This routines will be used to build the lists of recipients in the various modules, expand mailing lists and merge into the recipient lists, and other basic list processing. .HL3 Queue processing .hl4 QMS__INPUT__TO__QUEUE.C Any routines that deal with the creation of a queue request reside in this module. .HL4 QMS__OUTPUT__FROM__QUEUE.C Any routines that deal with the reading and deletion of a queue request reside in this module. .hl3 Network Support .HL4 QMS__TCPIP.C Basic set of network I/O routines for TCP/IP. .HL4 QMS__DECNET.C Basic set of network I/O routines for DECnet. .HL4 QMS__MX__DECNET.C MX specific DECnet routines. .HL4 QMS__M11__DECNET.C MAIL-11 specific DECnet routines. .HL4 QMS__MM__DECNET.C MM specific DECnet routines. .EB .hl2 Images The following describe which modules go into a specific image. .HL3 QMS__ROUTER The router process is made from: .ls 0, "o" .le;QMS__ROUTER.C .LE;QMS__LISTS.C .le;QMS__PARSE__ADDRESS.C .LE;QMS__DISTR__LIST.C .BB .LE;QMS__GATEWAY.C .le;QMS__SYMBIONT.C .le;QMS__INPUT__TO__QUEUE.C .le;QMS__OUTPUT__FROM__QUEUE.C .LE;QMS__ERROR__MAIL.C .EB .els .hl3 MX-SERVER .LS 0, "o" .LE;QMS__SMTP__SERVER.C .le;QMS__PARSE__ADDRESS.C .LE;QMS__LISTS.C .LE;QMS__VALIDATE.C .LE;QMS__MX__DECNET.C .LE;QMS__DECNET.C .LE;SMTP.BLI .bb .le;QMS__LOGGER.C .le;QMS__INPUT__TO__QUEUE.C .eb .els .BB .HL3 MM-SERVER .EB .LS 0, "o" .LE;QMS__SMTP__SERVER.C .le;QMS__PARSE__ADDRESS.C .LE;QMS__LISTS.C .LE;QMS__VALIDATE.C .LE;QMS__MM__DECNET.C .LE;QMS__DECNET.C .LE;SMTP.BLI .bb .le;QMS__LOGGER.C .le;QMS__INPUT__TO__QUEUE.C .eb .els .HL3 MAIL11-SERVER .LS 0, "o" .LE;QMS__MAIL11__SERVER.C .le;QMS__PARSE__ADDRESS.C .LE;QMS__VALIDATE.C .LE;QMS__LISTS.C .LE;QMS__M11__DECNET.C .LE;QMS__DECNET.C .LE;QMS__VALIDATE.C .bb .le;QMS__INPUT__TO__QUEUE.C .els .HL3 INTERNET-SERVER .eb .LS 0, "o" .LE;QMS__SMTP__SERVER.C .le;QMS__PARSE__ADDRESS.C .LE;QMS__LISTS.C .BB .LE;QMS__VALIDATE.C .LE;QMS__TCP.C .le;QMS__INPUT__TO__QUEUE.C .EB .le;QMS__LOGGER.C .LE;SMTP.BLI .els .HL3 LOCAL-DELIVERY .LS 0, "o" .LE;QMS__LISTS.C .BB .le;QMS__DELIVERY__SYMBIONT.C .LE;QMS__ERROR__MAIL.C .le;QMS__OUTPUT__FROM__QUEUE.C .EB .els .HL3 DECNET-DELIVERY .LS 0, "o" .BB .le;QMS__DELIVERY__SYMBIONT.C .le;QMS__SYMBIONT.C .LE;QMS__ERROR__MAIL.C .le;QMS__OUTPUT__FROM__QUEUE.C .le;QMS__LOGGER.C .EB .LE;SMTP.BLI .LE;QMS__M11__DECNET.C .LE;QMS__MX__DECNET.C .LE;QMS__MM__DECNET.C .LE;QMS__DECNET.C .LE;QMS__LISTS.C .els .HL3 INTERNET-DELIVERY .LS 0, "o" .BB .le;QMS__DELIVERY__SYMBIONT.C .le;QMS__SYMBIONT.C .LE;QMS__ERROR__MAIL.C .le;QMS__OUTPUT__FROM__QUEUE.C .le;QMS__LOGGER.C .EB .LE;SMTP.BLI .LE;QMS__TCP.C .LE;QMS__LISTS.C .els