For exchanging electronic mail (e-mail) with users working on internet hosts, the TCP/IP Services product includes Simple Mail Transfer Protocol (SMTP), Post Office Protocol (POP) software, and Internet Message Access Protocol (IMAP). SMTP allows you to use the OpenVMS mail services to send and receive messages exchanged with users on other hosts. The POP and IMAP software allow you to use your PC mail software to receive and send messages. The software stores mail sent to you, even when the PC is turned off. To use TCP/IP mail services, you need the following: o Knowledge of the OpenVMS Mail utility o User names and host names or IP addresses of the people to whom you want to send mail
1 – Sending Mail
To send mail to another internet host also running SMTP, simply invoke the OpenVMS Mail utility at the DCL prompt, type SEND at the MAIL> prompt, and enter the destination. A remote destination consists of the destination user name followed by an at sign (@) and the destination host (such as user_name@host). If the user is on your local host, omit the at sign and host name. Specify the destination host as either a host name or an IP address. The OpenVMS Mail utility automatically detects destination addresses that include fully qualified host names (one in which the node component includes a period [.], such as MALCOLM@PHILOS.BU.EDU) and sends the mail using the SMTP protocol, unless your system has been set up to use a different Internet protocol (by defining an alternate protocol with the MAIL$INTERNET_TRANSPORT logical name). However, if you use a destination address that is not fully qualified - that is, one in which the node component does not include a period (.) - the Mail utility by default assumes the address is a DECnet address. For example, if you specified MALCOLM@PHILOS as the destination address, the Mail utility converts it to DECnet format (PHILOS::MALCOLM). You can force the OpenVMS Mail utility to use a specific protocol by defining the MAIL$INTERNET_MODE logical name. This is useful in cases where a mail address, such as MALCOLM@PHILOS, can be valid for either SMTP or DECnet. You can assign one of the following values to the MAIL$INTERNET_ MODE logical name: o SMTP OpenVMS Mail always interprets the node component of an unqualified address as an Internet address specification. (SMTP is the default mode unless you define an alternate Internet transport with the MAIL$INTERNET_TRANSPORT logical name.) o DECNET OpenVMS Mail always interprets the node component of an unqualified address as a DECnet node specification. o HYBRID (the default) OpenVMS Mail uses an Internet protocol if the node component of the address contains a period. If no periods are in the node component, Mail uses the DECnet protocol. Define the logical name in your LOGIN.COM file. For example, the following definition causes the Mail utility to interpret any address that does not include a period in the node component of the specification as an Internet address: $ DEFINE MAIL$INTERNET_MODE SMTP Another way to force the OpenVMS Mail utility to use SMTP is to include the SMTP% prefix immediately before the destination or IP address. Enclose the destination in quotation marks, as in the following example: $ MAIL MAIL> SEND To: SMTP%"malcolm@philos" To prevent the OpenVMS Mail utility from automatically converting an unqualified Internet host name address to a DECnet format, you can do one of the following: o Fully qualify the host name (for example, specify the destination address as MALCOLM@PHILOS.BU.EDU instead of MALCOLM@PHILOS). o Define the MAIL$INTERNET_MODE logical name as SMTP. o Include the SMTP% prefix before the destination address. For more information about the OpenVMS Mail utility and how it interprets addresses, see the appropriate OpenVMS documentation.
2 – Outbound Alias
SMTP allows you to specify an outbound alias that is applied to mail as it is sent and also specifies the network address to which a reply is sent.
3 – Defining the Outbound Alias
To specify an outbound alias, define the TCPIP$SMTP_FROM logical to the text you want your From: header to be. For example, you might define the logical as follows: $ DEFINE TCPIP$SMTP_FROM "bill.smith@xxx.com" This command sets the outbound alias to the following: From: bill.smith@xxx.com Define the TCPIP$SMTP_FROM logical before invoking OpenVMS Mail. If you always want the header to be sent with the outbound alias, define the logical in your login command procedure (LOGIN.COM). The outbound alias must be a valid address to which recipients can reply. If it is not valid, recipients cannot reply to you, and bounced mail messages are not returned to you. If you do not define the TCPIP$SMTP_FROM logical, the From: address on your mail messages is the same one that you have always had. Use only simple 7-bit ASCII characters in the value you assign to the TCPIP$SMTP_FROM logical. Do not use control characters. The address you use to define TCPIP$SMTP_FROM must be an RFC 822 legal SMTP address; that is, user@domain. If the address is not interpreted correctly, the SMTP mailer ignores it and uses the From: address that it has constructed for you.
4 – Personal Name String
If you have defined an OpenVMS Mail personal name, the SMTP mailer appends that string to the outbound alias. For example, a personal name might look like the following: Bill L. Smith Phone: 123-456-8000 The TCPIP$SMTP_FROM logical is defined as follows: $ DEFINE TCPIP$SMTP_FROM "bill.smith@xxx.com" The following example shows the resulting From: header: From: bill.smith@xxx.com (Bill L. Smith Phone: 123-456-8000) The personal name is appended to the From: address only if both of the following conditions are met: o The value you give for the TCPIP$SMTP_FROM logical does not contain parenthetical phrases (text within parentheses). o The From: address contains the SMTP domain string (the @domain portion of the address). To use a different personal name than the one defined in your OpenVMS Mail personal name, define the personal name string as part of the TCPIP$SMTP_FROM logical in a parenthetical phrase after the user@domain address. Separate the address from the parenthetical phrase with a space. Do not use double quotation marks (" ") in the personal name. For example, you can define the outbound alias logical as follows: $ DEFINE TCPIP$SMTP_FROM - _$ "bill.smith@xxx.com (Phone: 123-456-8000 FAX: 123-456-9000)" Note the following restrictions: o The SMTP mailer does not allow you to define the TCPIP$SMTP_ FROM logical using the following syntax: "personal-name" <user@host> o Do not specify the logical as follows: $ DEFINE TCPIP$SMTP_FROM """personal-name"" <bill.smith@xxx.com>" Instead, define the logical as follows: $ DEFINE TCPIP$SMTP_FROM "bill.smith@xxx.com (personal-name)"
5 – Substitute Domain String
If you define TCPIP$SMTP_FROM without an SMTP domain string (the @domain portion of the address), SMTP appends the substitute domain name to the text you define. If you do not define a substitute domain name, the host name is used. For example, the host is configured with a substitute domain name of x.com, and the TCPIP$SMTP_FROM logical is defined as follows: $ DEFINE TCPIP$SMTP_FROM "bill.smith" In this case, the resulting address is as follows: From: bill.smith@x.com However, if the host is not configured with a substitute domain and the host name is host.x.com, SMTP_FROM is defined as follows: $ DEFINE TCPIP$SMTP_FROM "bill smith" In this case, the resulting address is as follows: From: bill.smith@host.x.com
6 – Disabling Modifications
To disable the modifications that TCPIP SMTP makes to the value you assign to TCPIP$SMTP_FROM (such as appending the OpenVMS personal name and @domain to a value with no @domain), include the string [VERBATIM]. For example: $ DEFINE TCPIP$SMTP_FROM "[VERBATIM] bill.smith@xxx.com" The resulting address is as follows: From: bill.smith@xxx.com
7 – Return-Path Header
The address you define is used for the Return-Path: mail header. The Return-Path: header is used to bounce undeliverable mail. Note that the version of the text used for the Return-Path: header is stripped of comments (such as the personal name string) and always has a domain string.
8 – From: Header
When the TCPIP$SMTP_FROM logical is used to set the From: header, the text that would normally have been used for the From: header is added to the headers as an X-VMS-True-From: header.
9 – Disabling Outbound Alias
To disable outbound alias processing and use of the TCPIP$SMTP_ FROM logical, define the following system logical: $ DEFINE/SYSTEM TCPIP$SMTP_PROHIBIT_USER_HEADERS 1
10 – Multiple Recipients
To send mail to more than one user, use the SEND command, but at the To: prompt, type a list of names or the name of an existing distribution list. When you type a list of names, use the following guidelines: o Separate the names with a comma ( , ). o If multiple users are on the same remote host, type the full user_name@host combination for each user. o If a user is on your local host, omit the at sign (@) and host name. For example: MAIL> SEND To: user1,user2,user3@host3,user4@host4 In the preceding example, user1 and user2 are located on the local OpenVMS system; user3 is located on host3; and user4 is located on host4. MAIL> SEND To: user1@host5,user2@host5 In the preceding example, both user1 and user2 are located on remote host host5. To send mail to multiple users by entering the name of a distribution list, follow these guidelines: o The file with the distribution list can be yours or belong to someone else. o The file can reside locally or remotely. o Do not include the names of other distribution lists in the distribution list. You can use two kinds of distribution lists: OpenVMS distribution lists and SMTP distribution lists.
10.1 – OpenVMS list
Generate an OpenVMS distribution list as follows: - Create a .DIS file in your own directory or use an existing one. - You can include comment lines (lines preceded by an exclamation mark [!]) in the .DIS list file. - You can include both OpenVMS addresses and SMTP addresses. If you want the OpenVMS Mail utility to use SMTP for all SMTP addresses, qualified and unqualified, either set the MAIL$INTERNET_MODE logical name to SMTP, specify fully qualified SMTP addresses only, or use the SMTP% prefix with the destination enclosed in quotation marks. - To send mail to the people on your distribution list, enter the following command: MAIL> SEND To: @list_name
10.2 – SMTP list
Generate an SMTP distribution list as follows: - Use an existing .DIS file or create a .DIS file in SYS$SPECIFIC:[TCPIP$SMTP] or, if defined on your system, TCPIP$SMTP_COMMON:. - Give the list a unique name that is not the same as a local user name. - To specify comment lines, use an exclamation mark (!) in the first column. - Include only SMTP addresses. - Use one address per line. - To send mail to the people on this distribution list, enter the following command: MAIL> SEND To: list_name@host_where_list_resides If the MAIL$INTERNET_MODE logical name is not set to SMTP, either specify a fully qualified host name or use the SMTP% prefix.
10.3 – Examples
The following examples show different methods of using distribution lists. 1. This example sends mail to users whose names are on the local OpenVMS distribution list AGENCIES.DIS. The distribution list file is displayed in this example. The MAIL$INTERNET_MODE logical name is not set, so by default unqualified Internet addresses would be sent over DECnet; therefore, the AUDUBON@NY address is included with the SMTP% prefix and quotation marks. $ TYPE AGENCIES.DIS ! ! This is an OpenVMS distribution file named AGENCIES.DIS. ! SMTP%"audubon@ny" WILLIAMS@BELTWAY.ORG WILDLIFE@DALLAS.ORG jmuir@19.8.7.6 SEC@GP.INTER8.ORG BATES::SCOPE ! $ MAIL MAIL> SEND To: @AGENCIES.DIS Subj: NEWS TO WATCH FOR 2. This example sends mail to users whose names are on the local SMTP distribution list SYS$SPECIFIC:[TCPIP$SMTP]NATL_ INTEREST.DIS. The distribution list file is displayed in this example. $ TYPE NATL_INTEREST.DIS green@19.8.7.6 wlf@19.7.6.5 arlo@19.4.3.2 free::monicaL wendell@biolo.ne.edu $ MAIL MAIL> SEND To: natl_interest@main_office.org Subj: News Items 3. This example sends mail to the users on SMTP distribution list FINANCE_CENTERS.DIS, which is maintained on remote mail server host HOLBROOK. $ TYPE FINANCE_CENTERS.DIS ny_accts@23.9.7.4 sf_stocks@23.7.11.2 dallas_pfs@23.1.5.1 denver_accts@holbrook $ MAIL MAIL> SEND To: finance_centers@holbrook Subj: Portfolio Activity
11 – Reading Mail
To read received mail, follow these steps: 1. At the DCL prompt, type MAIL. 2. At the MAIL> prompt, enter the DIRECTORY command to view a list of received messages. 3. Enter the READ command or indicate the message number you want to view in exactly the same way as you would for OpenVMS mail. In the following example, a user views the directory of unread new mail and selects message 3 to read. $ MAIL You have 3 new messages. MAIL> DIRECTORY NEWMAIL # From Date Subject 1 GWAY::SMTP%"helenm@bhc 10-MAR-2001 Just Checking In 2 GWAY::SMTP%"mays@sfg 11-MAR-2001 Common Bases 3 CBIRD::SMTP%"seaway 12-MAR-2001 Cruises MAIL> 3
12 – Name String
You can define a personal name string that is included at the top of the mail messages you send. To create a personal name with SMTP mail, use the SET PERSONAL_NAME command. Note the following restrictions: o Enclose the string in double quotation marks. o Do not use additional double quotation marks within the string. o You can use single quotation marks ( ' ' ) within the personal name. o Do not use 8-bit ASCII characters (for example, ä or ö). The eighth bit is truncated. For example, ä becomes d and ö becomes v. The following commmand sets a personal name that includes quotation marks: $ MAIL MAIL> SET PERSONAL_NAME "'Wealth' is in the mind"
13 – Carbon-Copies
You can enable carbon copying by using the SET CC-PROMPT command. Follow these guidelines when you specify destinations for the CC: prompt: o Follow the OpenVMS Mail conventions for copying mail to other people or to yourself. o For entering the correct address, follow the guidelines listed in the Sending Mail section. The following example sends mail to user AL and copies to users ROLLINS, BOND, and RICH: MAIL> SEND To: al@airways CC: rollins,bond,rich@flight_central.com Subj: Directions for Night Flight
14 – Forwarding Messages
You can forward any mail you receive to any internet host. Follow the OpenVMS Mail conventions for forwarding mail.
15 – Routing Mail Using UUCP
The UNIX-to-UNIX Copy Program (UUCP) lets a system copy files to and from other systems running UUCP. UUCP is usually used to copy files over a dialup connection. To route mail using UUCP, ask your system manager to define the general gateway in the SMTP configuration. To use SMTP to route mail to a system running UUCP, address the mail as follows: MAIL> SEND To: SMTP%"user_name!uucp_host" The following example sends mail to geoffrey at host haldir: $ MAIL MAIL> SEND To: SMTP%"geoffrey!haldir.of.com" Ask your system manager whether you need to specify a gateway host in mail addresses when you work on UUCP dialup lines.
16 – Management Commands
The following table lists the management commands that can help you work with SMTP mail currently in a queue. Type them at the TCPIP> prompt. Table 1 Commands for Using SMTP Command Function SHOW MAIL Displays information about mail messages queued to your process' user name. REMOVE MAIL Deletes mail messages that are in a holding state in SMTP queues. SEND MAIL Releases for delivery a mail message that is in a holding state.
17 – Displaying Mail Status
Use the SHOW MAIL command to display the following information about SMTP mail: o Message (entry) number of the queued mail o User name of the sender (to display information about other users, you need SYSPRV or BYPASS privilege) o File name of the queued mail o Status of a message
18 – Deleting Queued Mail
The following examples show how to delete mail messages from SMTP queues using the TCP/IP command REMOVE (similar to the DCL command DELETE/ENTRY). NOTE Use this command only to release mail messages that are being held; do not use this command to delete mail messages in the processing state.
19 – Releasing Queued Mail
The following example shows how to requeue an SMTP mail message that is currently holding, using the TCP/IP command SEND MAIL (similar to the DCL command ENTRY/RELEASE). You are prompted to confirm that you want the mail message requeued. $ TCPIP SEND MAIL /ENTRY=828 _PLUTO$DKD0:[MARLOW]970207015114580_MARLOW.TCPIP_PLUTO;1? y