MAIL11D(L)

NAME
mail11d - server for incoming MAIL-11 messages

DESCRIPTION
The mail11d program is invoked whenever inbound MAIL-11 mail arrives from a remote computer system running DECnet (e.g. a VAX/VMS system). The program is invoked automatically by the DECnet object spawner (on Ultrix), or dnaserver (on SunOS) with standard input and output connected to a DECnet socket.

mail11d converts the incoming message from MAIL-11 format to RFC822 format. In the process of the conversion, it attempts to convert sender and recipient addresses into domain-style names. The To:, X-To:, From:, and Subject: headers are synthesized from the MAIL-11 envelope. In addition, mail11d adds Received: and Date: headers based on the local system time of arrival.

mail11d establishes an SMTP connection with the local system mailer (usually sendmail(8)), which it uses to verify addresses and to queue the mail for delivery.

mail11d currently implements the MAIL-11 protocol at about the level implemented by early VMS version 4 systems. It does, however, negotiate the use of the Cc: field with the MAIL-11 client.

CONFIGURATION
The following ncp configuration is appropriate for mail11d on DECnet-Ultrix systems:
object name = mail11
object number = 27
file = /usr/local/lib/mail11d
default user = daemon
packet type = sequenced packet
accept = deferred

The settings for "file" and "default user" may be modified to suit local conventions. These settings are similar to those required by the mail11dv3 program supplied with DECnet-Ultrix version 3 or later. To install mail11d on SunOS systems running SunLink/DNI, put the line
27 MAIL /usr/local/lib/mail11d
in /usr/sunlink/dna/dnaserver.reg, then kill and restart dnaserver. On SunOS it may be advisable to make "dna" a trusted user in the sendmail configuration file.

ADDRESS TRANSLATION
In an attempt to be as compatible with as many RFC822 user agents as possible, mail11d translates sender addresses into a domain-style syntax. For example, mail from user JOE at node FOO will have a From: address of JOE@FOO.DECnet instead of FOO::JOE. Complex DECnet addresses or VMS MAIL foreign protocol addresses are quoted according to RFC822 conventions, and to emphasize routing precedence. For instance:

FOO::BAR::JOE becomes "BAR::JOE"@FOO.DECnet, and
FOO::BITNET%"USER@NODE" becomes "BITNET%\"USER@NODE\""@FOO.DECnet

A site-specific suffix can be used instead of ".DECnet" by enclosing mail11d in an executable shell script which sets the environment variable DECNET_DOMAIN_SUFFIX to be the desired string. In addition, if mail arrives from DECnet node FOO, and the environment variable FOO_DOMAIN is set, the translated variable is used as the domain instead of FOO.DECnet. This allows primitive conversion of DECnet node names to Internet domain names.

Recipient addresses are translated as follows:
Two consecutive double quotes ("") are converted to one double quote (").
Single double quotes (") are stripped.
Single quotes (') are converted to double quotes (").
Backslash-d (\d and \D) is converted to a double quote (").
Backslash-s (\s and \S) is converted to a single quote (').
Single quotes and backslashes may be quoted by preceeding them with a single backslash (\).

Unfortunately, the MAIL-11 To: address cannot be reliably translated into a legal RFC822 To: address, because the MAIL-11 To: address may contain untranslated logical names that do not denote actual addresses on the originating node. Since RFC822 requires a valid recipient header in all messages, mail11d constructs a To: line from the recipient list in the MAIL-11 envelope.

FUTURE DIRECTIONS
mail11d should eventually be able to perform smarter address translation on From: addresses. In particular, it should be able to shorten DECnet forwarding paths if intermediate nodes are reachable. Other transformations are also possible and desirable, given the inability of vanilla sendmail to perform inbound channel-specific rewrites.

Eventually, mail11d should be able to support block-mode transmission, and other more recent additions to the MAIL-11 protocol.

It would be desirable for mail11d to recognize whether an incoming message already contains RFC822 headers. In this case mail11d would generate only Received:, Resent-to:, and Resent-From: headers instead of the entire header set.

Ideally, mail11d would attempt to determine whether any message recipients had mail forwarded to DECnet, in which case the message would be sent immediately to those recipients without going through sendmail and without address translation or header processing.

FILES
/usr/sunlink/dna/dnaserver.reg (SunOS only)

SEE ALSO
mail11(local), sendmail(8), ncp(8)
Simple Mail Transfer Protocol, RFC821
Standard for ARPA Internet Text Messages, RFC822
DECnet-Ultrix User's and Programmers Guide (Ultrix systems)
SunLink DNI System Administration Guide (SunOS systems)

BUGS
Artifically constructed To: addresses can be very long.
Lines longer than 512 characters cannot be transmitted, nor can lines containing a single ASCII NUL.

AUTHOR
Keith Moore, Computer Science Department, The University of Tennessee at Knoxville
<moore@utkcs2.cs.utk.edu>

ACKNOWLEDGEMENTS
"DECnet", "Ultrix", "VAX", and "VMS" are trademarks of Digital Equipment Corporation.
"SunLink" is a trademark of Sun Microsystems, Inc.

COPYRIGHT
Copyright © 1989, Keith Moore.