DIGITAL TCP/IP Services for OpenVMS
User's Guide


Previous Contents Index


Chapter 5
Sending and Receiving E-Mail Using SMTP

For exchanging electronic mail (e-mail) with users working on internet hosts, the DIGITAL TCP/IP Services for OpenVMS product includes Simple Mail Transfer Protocol (SMTP) and Post Office Protocol (POP) software.

What You Can Do

The following table lists the SMTP electronic mail services you can perform and the sections that explain how to use them.
Capability Section
Send mail to users on other internet hosts 5.2
Send mail to multiple users, with and without distribution lists 5.3
Receive mail from users on other internet hosts 5.4
Set a "personal" name 5.5
Create a carbon copy of your messages 5.6
Forward messages 5.7
Use the UNIX to UNIX copy program (UUCP) to send mail 5.8
Use your PC mail software to receive and send messages 5.10
Get status information about SMTP mail 5.9.1
Remove holding state mail messages from SMTP queues 5.9.2
Requeue holding state mail messages for delivery 5.9.3

What You Need

To use the DIGITAL TCP/IP Services for OpenVMS mail services, you need the following:

5.1 Obtaining Online Help

You can obtain online help for DIGITAL TCP/IP Services for OpenVMS electronic mail by entering the following command:


$ HELP TCPIP_SERVICES SMTP

5.2 Sending Mail

To send e-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 user name followed by an ampersand (@) and the host (such as user_name@host). If the user is on your local host, omit the ampersand (@) and host name.


$ MAIL
MAIL> SEND
To: destination_user@destination_host

Specify the destination host as either a host name or an IP address. The following example sends mail to user MALCOLM at host PHILOS.BU.EDU:


$ MAIL
MAIL> SEND [Return]
To:     malcolm@philos.bu.edu [Return]
Subj:   Final Exams[Return]

The following example sends mail to user MALCOLM at the host with IP address 16.20.40.59:


$ MAIL
MAIL> SEND [Return]
To:     malcolm@16.20.40.59 [Return]
Subj:   Final Exams[Return]

The OpenVMS Mail utility automatically detects destination addresses that include fully qualified host names (where 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 the 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:

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. At the To: prompt, type SMTP% and, with no space, either the destination name or IP address. Enclose the destination in quotation marks, as in the following example:


$ MAIL
MAIL> SEND
To: SMTP%"malcolm@philos" 

So, if you want to prevent the OpenVMS Mail utility from automatically converting an unqualified Internet host name address to a format for DECnet use, you have three choices:

For more information on the OpenVMS Mail utility and how it interprets addresses, see the appropriate OpenVMS documentation.

5.3 Sending Mail to Multiple Users

To send mail to more than one user, use the SEND command as discussed in the previous section, but at the To: prompt type one of the following:

5.3.1 Entering a List of Names

When you type a list of names, use the following guidelines:

Use the following syntax:


MAIL> SEND 
To: user1,user2,user3@host3,user4@host4

where:


MAIL> SEND 
To: user1@host5,user2@host5

In this example, both users are located at remote host5.

The following example sends the same mail to:


MAIL> SEND MEETINGS.TXT 
To: NOWAK@CENTRAL.GREEN.ORG,BRENT@CENTRAL.GREEN.ORG, MILLER@BOSTON.GREEN.ORG  
Subj:  SCHEDULE AND AGENDAS 

5.3.2 Distribution Lists

To send mail to multiple users by entering the name of a distribution list, follow these guidelines:

You can use two kinds of distribution lists:

The following examples show some 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
    

5.4 Receiving Mail

To read received mail, follow these steps:

  1. At the DCL prompt, type MAIL.
  2. At the MAIL> prompt, use the DIRECTORY command to view a list of received messages.
  3. Use 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-1998  Just Checking In 
2 GWAY::SMTP%"mays@sfg 11-MAR-1998  Common Bases 
3 CBIRD::SMTP%"seaway 12-MAR-1998  Cruises 
 
MAIL> 3

5.5 OpenVMS Mail Personal Name String

You can define a "personal name" string that is included at the top of all the mail messages you send. To create a personal name with SMTP mail, use the SET PERSONAL_NAME command with the following restrictions:

The following example shows a user setting a personal name that includes quotation marks:


$ MAIL
MAIL> SET PERSONAL_NAME "'Wellth' is in the mind" 

5.6 Carbon-Copying Messages

You can enable "carbon copying" by using the SET CC-PROMPT command. Follow these guidelines when you specify destinations for the CC: prompt:

The following example sends mail to user AL and carbon copies users ROLLINS, BOND, and RICH:


MAIL> SEND
To:     al@airways
CC:     rollins,bond,rich@flight_central.com
Subj:   Directions for Night Flight

In the following example, OpenVMS user BRODIE sends mail to UNIX user owens and copies soltau.


MAIL> SET CC_PROMPT
MAIL> SEND
To:     owens@kezar
CC:     soltau@fgtoo.bonkers.org
Subj:   Goals for the Week
Enter your message below. Press CTRL/Z when complete, or CTRL/C to quit:
 
RC: Let's get a jump on the ball this time. 
We'll meet before the conference to organize. 
- J.B.[Ctrl/Z] (not echoed) [Exit]

5.7 Forwarding Messages

You can forward any mail you receive to any internet host. Follow the OpenVMS Mail conventions for forwarding mail.

If you move to another system that supports SMTP, SMTP can forward your mail to your new location. When you set this features, type the new address within three sets of quotation marks.

Use the following syntax:


MAIL> SET FORWARD 
_Address:SMTP%"""new_user_name@forwarding_host"""

In the following example, user CYGNET sets automatic SMTP forwarding from host NOW to user ELLIS at host FUTURE:


MAIL> SET FORWARD /USER=now::cygnet 
_Address: SMTP%"""ellis@future""" 

5.8 Using the UNIX to UNIX Copy Program

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 (see Section 5.8.1).

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"

5.8.1 Dialup Connections

Ask your system manager if you need to specify a gateway host in mail addresses when you work on UNIX to UNIX Copy Program (UUCP) dialup lines.

The following example sends mail during a dialup connection by specifying a gateway host:


MAIL> SEND
To: gateway_host!crandle!watts
CC:     billw,jenny,ibis
Subj:   Events Schedule

5.9 Management Commands for Mail

You can use the management commands described in Table 5-1 to help you work with SMTP mail messages currently in a queue. Type these commands at the TCPIP> prompt.

Table 5-1 Commands for Using SMTP
Command Function
SHOW MAIL Displays information about mail
REMOVE MAIL Deletes mail messages that are in holding state in SMTP queues
SEND MAIL Releases for delivery a mail message that is in a holding state

The following subsections describe how to use these commands. For full command descriptions, see the DIGITAL TCP/IP Services for OpenVMS Management Command Reference.

5.9.1 Displaying SMTP Mail Status Information

Use the SHOW MAIL command to display information about SMTP mail, such as:

The following examples show how to display SMTP mail status information.

  1. The following command displays information about message 826 in an SMTP queue. By default, the command returns brief information. Specify /FULL for more detailed information, as in the example that follows.


    $ TCPIP SHOW MAIL /ENTRY=826
     
    SMTP Mail Queue Entry   826    User: MARLOW 
      File: _PLUTO$DKD0:[MARLOW]970207015114579_MARLOW.TCPIP_PLUTO;1 
      Status: Processing
    

  2. The following command displays detailed information about all your mail. The /RECIPIENT qualifier, used with the /FULL qualifier, displays selected classes of information, depending on the =option value you specify:
    Option Description
    ALL Shows failed, sent, and unsent messages
    FAILED Shows messages that could not be read for a particular recipient
    SENT Shows successful deliveries to a particular recipient
    UNSENT Shows messages that, as yet, are unsent


    $ TCPIP
    TCPIP> SHOW MAIL /FULL /RECIPIENT=ALL
     
    SMTP Mail Queue Entry:    826        User: MARLOW 
    File: _PLUTO$DKD0:[MARLOW]970207015114579_MARLOW.TCPIP_PLUTO;1 
    Status: Processing 
     
    Message Destinations: 
     
        Address:  marlow@pluto 
     
    Message Headers: 
     
        Return Path: ??? 
     
    SMTP Mail Queue Entry:    828       User: MARLOW 
      File: _PLUTO$DKD0:[MARLOW]970207015114580_MARLOW.TCPIP_PLUTO;1 
      Status: Holding
     
    Message Destinations: 
     
        Address:  marlow@pluto 
     
    Message Headers: 
     
        Return Path: ??? 
     
     
    

5.9.2 Deleting Holding State Mail Messages from SMTP Queues

The following examples show how to delete mail messages from SMTP queues, using the TCPIP REMOVE command (similar to the DCL DELETE/ENTRY command).

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.
  1. The following example deletes mail message 828, a message that is holding (the message corresponds to your process's user name, or you have SYSPRV or BYPASS privileges). You are prompted to confirm that you want the message deleted.


    $ TCPIP REMOVE MAIL /ENTRY=828
    _PLUTO$DKD0:[MARLOW]970207015114580_MARLOW.TCPIP_PLUTO;1? y
     
    

  2. This next example removes all messages for your process's user name, or deletes everything in the SMTP queue if you have either SYSPRV or BYPASS privileges. The /NOCONFIRM qualifier prevents DIGITAL TCP/IP Services for OpenVMS from prompting you for confirmation. Before deletion, DIGITAL TCP/IP Services for OpenVMS copies this queued mail to the specified directory.


    $ TCPIP REMOVE MAIL /NOCONFIRM /COPY=[MARLOW.OLD_MAIL]
    


Previous Next Contents Index