DIGITAL TCP/IP Services for OpenVMS
Management


Previous Contents Index

14.1.4 Understanding SMTP Addresses

SMTP addresses are of the form userID@domain.name, where domain.name refers to a valid DNS domain. Mail exchange (MX) records point electronic mail to a particular address (host and account) in that domain.

14.1.5 How SMTP Routes Mail

To find a destination address, SMTP routing looks up addresses in this order:

  1. Local MX database
  2. Remote MX database
  3. BIND database
  4. Local hosts database

MX routing first checks the local preference but tries it only once in the lookup process.

14.1.5.1 Using MX Records

SMTP uses the information stored in MX records to route mail. Each MX record contains a list of hosts that can accept mail for the specified destination. The list is in order of routing preference. Each MX record contains the following fields:
Destination domain Indicates the mail destination. Multiple MX records for the same destination are allowed.
Gateway host name The name of the host through which mail is routed.
Preference Prioritizes multiple MX records for the same destination domain. The lower the preference value, the higher the priority for the MX record.

Creating multiple MX records for the same destination domain provides the following advantages:

Use the SET MX_RECORDS command to enter routing information to the MX database. For example, the following example command assigns MERLIN as the gateway for CROW with a preference 100:


TCPIP> SET MX_RECORDS CROW /GATEWAY=MERLIN /PREFERENCE=100

See the DIGITAL TCP/IP Services for OpenVMS Management Command Reference for a detailed desciption of the SET MX_RECORDS command.

14.1.5.2 Using SMTP Zone and Alternate Gateway

When configuring SMTP, you supply the name of the domain for your environment with the /ZONE qualifier to the SET CONFIGURATION SMTP command. If you do not supply a domain name, the zone defaults to one level higher than your local domain. For example, if your local domain is a.b.com, the default value of /ZONE is b.com (assuming that, because TCPIP has been started, the domain is known).

Mail for delivery outside of your zone is sent to its destination by the alternate gateway, as defined by the /GATEWAY qualifier. This is an alternate route through which SMTP sends mail if delivery fails. If you define an alternate gateway, SMTP checks if the gateway is part of or outside of your local domain and relays the mail accordingly. (If you do not specify an alternate gateway, SMTP uses the MX records to determine which host should relay mail.)

In the following example commands defines the alternative gateway MY.ALT.MYZONE.COM and the zone MYZONE.COM.


TCPIP> SET CONFIGURATION SMTP/GATEWAY=ALTERNATE=MY.ALT.MYZONE.COM 
TCPIP> SET CONFIGURATION SMTP/ZONE=MYZONE.COM 
 

See the DIGITAL TCP/IP Services for OpenVMS Management Command Reference for a detailed desciption of the SET CONFIGURATION SMTP command.

14.2 Starting and Stopping SMTP

SMTP consists of two components: the sender (the queuing mechanism) and the receiver. You must start the sender before enabling the receiver. The receiver is activated by the auxiliary server.

To start the SMTP sender, enter:


$ @SYS$MANAGER:TCPIP$SMTP_STARTUP 

To enable the receiver, enter:


$ TCPIP ENABLE SERVICE SMTP 

To stop SMTP, enter:


$ @SYS$MANAGER:TCPIP$SMTP_SHUTDOWN 

14.3 Configuring SMTP

Use the configuration procedure TCPIP$CONFIG to set up SMTP on your host. If you need to reconfigure or further refine your SMTP environment, use the SET CONFIGURATION SMTP command. With this command, you can change the way SMTP:

For a complete description of this command, its qualifiers, and options, see DIGITAL TCP/IP Services for OpenVMS Management Command Reference.

14.3.1 Mail Utility Files

Outgoing mail files are stored in the user profile default directory. Incoming mail files are temporarily stored by the receiving process in the SYS$SPECIFIC:[TCPIP$SMTP] directory. These files have names such as:

92022509472729_USERNAME.TCPIP_HOSTNAME

or

92022509472729_SYSTEM.TCPIP_HOSTNAME

Table 14-2 lists the utility files created during the SMTP configuration.

Table 14-2 Default SMTP Utility Files
File Name Description
LOGIN.COM Used by the auxiliary server
TCPIP$SMTP_RECV_RUN.COM Used by the auxiliary server
TCPIP$SMTP_LOGFILE.LOG Log of mail queue and symbiont activities
TCPIP$SMTP_RECV_LOGFILE.LOG Log of incoming mail

To analyze the consistency of the SMTP queues against the directories containing the SMTP utility files, enter the ANALYZE MAIL command.

14.3.2 Creating a Postmaster Account

The Postmaster account is a required account that receives all undeliverable mail. The SMTP process account serves as the Postmaster account by default. You can change this by specifying a different account name with the /POSTMASTER qualifier to the SET CONFIGURATION SMTP command.

To set up a Postmaster account, follow these steps:

  1. Check that the spooling directory is in a SYS$SPECIFIC directory.
  2. Ensure that the Postmaster account can gain access to the spooling directory.
  3. Define the same user name and Postmaster in the SMTP service's definition.

SMTP requires that the system be able to receive mail addressed to the user name POSTMASTER. To meet this requirement, do one of the following:

14.4 Creating a Local Alias File

To define a list of domains that SMTP interprets as local:

  1. Create the file TCPIP$SMTP_LOCAL_ALIASES.TXT.
  2. Include a list of domain names that are to be recognized as local (maximum 64 characters), one line per name, up to a maximum of 255 names. For example:


    ! 
    ! This is the local alias file. 
    ! 
    ourdomain.edu 
    ourdomain1.edu 
    ourdomain2.edu 
    ourdomain3.edu 
     
    

  3. Copy the TCPIP$SMTP_LOCAL_ALIASES.TXT file to one of the following locations:
  4. Stop and restart SMTP for the change to take effect.

If SMTP cannot locate the TCPIP$SMTP_LOCAL_ALIASES.TXT file, it looks for the file TCPIP$SMTP_COMMON:UCX$SMTP_LOCAL_ALIASES.TXT. This support is provided for mixed clusters (running TCP/IP Services V5.0 and earlier versions of the product (UCX)) where the TCPIP$SMTP_COMMON and UCX$SMTP_COMMON logicals point to the same directory. Note that when SMTP looks for UCX$SMTP_LOCAL_ALIASES.TXT it looks for it in the TCPIP$SMTP_COMMON: directory rather than the UCX$SMTP_COMMON: directory.

14.5 Managing the SMTP Symbiont Queues

Table 14-3 summarizes the commands you use to monitor and manage SMTP.

Table 14-3 SMTP Management Commands
Command Function Required Privilege
ANALYZE MAIL Verifies the consistency of the SMTP queues against the SMTP working directory. SYSPRV or BYPASS
DISABLE SERVICE SMTP Stops SMTP service. 1
ENABLE SERVICE SMTP Initializes communications for SMTP. 1
REMOVE MAIL Deletes the specified mail entries from the SMTP queues.  
SEND MAIL SMTP requeues a mail message for delivery. SYSPRV or BYPASS for messages other than yours.
SET CONFIGURATION SMTP Modifies the characteristics of the SMTP sender and receiver. SYSPRV or BYPASS
SHOW CONFIGURATION SMTP Displays the system characteristics for SMTP. 1
SET SERVICE SMTP Defines, modifies, or deletes the SMTP service in the services database. SYSPRV or BYPASS
SHOW MAIL Displays information about mail for the specified user. SYSPRV or BYPASS
SHOW SERVICE SMTP Displays statistical information about the SMTP server. 1
START MAIL Starts the SMTP queuing mechanism. SYSPRV or BYPASS
STOP MAIL Stops the SMTP queuing mechanism. SYSPRV or BYPASS


1Indicates that the command follows OpenVMS file protection rules.

14.5.1 Displaying Queues

To monitor the mail queues, examine the TCPIP$SMTP_LOGFILE.LOG and the TCPIP$SMTP_RECV_RUN.LOG files.

14.5.2 Changing the Number of Queues

To change the number of SMTP queues, follow these steps:

  1. Stop SMTP and MAIL on the root node by entering the following commands:


    TCPIP> DISABLE SERVICE SMTP 
    TCPIP> STOP MAIL 
    

  2. Change the SMTP configuration by entering the following command:


    TCPIP> SET CONFIGURATION SMTP/QUEUES=new_number
    

    The maximum number of queues set with this command is 10.

  3. Restart SMTP and MAIL by entering the following commands:


    TCPIP> ENABLE SERVICE SMTP 
    TCPIP> START MAIL 
    

14.5.3 Displaying SMTP Routing Information

To display SMTP routing information, use the SHOW MX_RECORDS command.

Example 1:

This example displays, in order of preference, the routing hops to reach host SWAN if an attempt fails. The local host tries to route through:

  1. WATER.PIPIT.WEBBED.FEET.COM
  2. bd-gw.purple.martin.com
  3. great.horned.owl.com
  4. bird.food.seeds.worms.com

In the example:


TCPIP> SHOW MX_RECORDS SWAN
                              BIND MX database 
 
Server:          18.18.218.10     GREAT.HORNED.OWL.COM 
 
Gate address     Preference       Gate name 
 
18.18.218.10     50               WATER.PIPIT.WEBBED.FEET.COM 
18.1.218.16      100              bd-gw.purple.martin.com 
188.88.206.2     200              great.horned.owl.com 
199.9.214.1      300              bird.food.seeds.worms.com 
 
 
                              BIND database 
 
Server:          18.18.218.10     WATER.PIPIT.WEBBED.FEET.COM 
 
Host address                      Host name 
 
18.18.100.10                      SWAN.WEBBED.FEET.COM 

Example 2:

The following example shows the MX records for destination host crow.com. In the example:

The local host is WATER, the alternate gateway is scare.crow.com, and the zone is crow.com. The first preference for delivering mail to crow.com is to try to send to cawcaw.crow.com.

If you have not defined an alternate gateway, SMTP tries to relay the mail to scare.crow at IP address 158.228.12.253 in the zone, not the destination host name. Therefore, SMTP checks to see if cawcaw.crow is in the zone daw.com.


TCPIP> SHOW MX_RECORDS CROW.COM
                             BIND MX database 
 
Server:          18.18.218.10     WATER.PIPIT.WEBBED.FEET.COM 
 
Gate address     Preference       Gate name 
 
159.228.12.253   1                cawcaw.crow.com 
159.228.12.254   2                scare.crow.com 

Example 3:

The following example shows the local MX configuration for destinations JUNCO and ubird.edu. In the example:


TCPIP> SHOW MX_RECORDS JUNO
 
                              Local MX database 
 
Destination                  Preference      Gateway 
 
JUNCO                            8           HERON 
                                 2           TURKEY 
ubird.edu                        100         tragopan.asian.pheasant.edu 
                                 50          owl.wise.mouser.edu 

14.5.4 SMTP Logging

SMTP logs mail queue and mail symbiont events to the following files:

The symbiont and receiver contain a feature called snapshot logging, which allows you to run with full diagnostics enabled but to write the diagnostics to the log file only if an error is signaled. This feature saves disk space and allows the receiver or the symbiont, or both, to run at a normal speed. As each line of diagnostic text is generated, it is saved in an internal snapshot buffer rather than to the disk. The buffer is circular in that once it fills up, new lines of text start to overwrite the old data already there. This functionality provides a snapshot of the last lines of diagnostic text.

Logical names are available to modify the way SMTP logs information and the type of information it reports.

14.6 Modifying Your SMTP Configuration

You can modify your SMTP configuration by defining logical names that are translated at queue startup time. Characteristics you can affect include:

Some SMTP logical names are used to either enable or disable a configuration option and do not require a value. If you define the logical name, the option is considered to be enabled. If not defined, the option is disabled. To disable an option, remove the logical name.

For example, to enable message logging for messages received from and transmitted to remote SMTP clients, define the TCPIP$SMTP_RECV_TRACE as follows:


$ DEFINE/SYSTEM TCPIP$SMTP_RECV_TRACE 
 

Other logical names require that you supply a value. For example, to enable logging that provides information about symbiont activity during control file processing, define the logical name TCPIP$SMTP_LOG_LEVEL with a value of 3. For example:


$ DEFINE/SYSTEM TCPIP$SMTP_LOG_LEVEL 3 
 

The following descriptions indicate where a value is required.

Note

Define the SMTP configuration logical names as /SYSTEM except where noted.


Previous Next Contents Index