• Aucun résultat trouvé

The Simple Mail Transfer Protocol

Dans le document DEC TCP/IP Services for VMS (Page 36-40)

This chapter explains how to use the Applications implementation of the Simple Mail Transfer Protocol (SMTP). SMTP allows you to exchange mail with remote systems within a heterogeneous network environment.

5.1 Accessing SMTP

SMTP uses VMSmail for both its sending and receiving user agents. To send mail using SMTP or to receive mail sent using SMTP, access VMSmail. For example, if you are using a standard Digital terminal, enter the MAIL command at the system prompt.

$

When you enter VMSmail, the system displays the MAIL prompt.

MAIL>

5.2 Sending Mail from VMS Using SMTP

To send mail from VMSmail using SMTP, add SMTP% as a prefix to the mailing address, as shown in the following example:

MAIL>

TO:

The prefix specifies SMTP as the transport protocol. If you use the SMTP%

prefix, you can use SMTP as the transport protocol anywhere you can specify a mail address, including FORWARD and CC:.

5.3 Addressing SMTP Mail

Applications implementation of SMTP allows you to use both SMTP and standard VMSmail addresses. Therefore, you can use whichever addressing scheme you prefer.

5.3.1 SMTP Format Rules

SMTP-style addresses allow you to use many different addressing schemes, depending on the destination of your mail and the route it takes. The following list explains SMTP addressing conventions.

• If you are using SMTP format, you must enclose the address in quotation marks.

• In SMTP format, you list the user name first, followed by the host name.

• The user name and host name are separated by an at sign (@).

The Simple Mail Transfer Protocol 5-1

• Other legal address separators include the following:

Percent sign (%), interpreted the same as an at sign (@) if the at sign is not present. Percent signs can also be used to route mail to gateways to non-Internet systems.

Single colon ( : ) indicates the mail is routed through a host.

Exclamation point (!) indicates that the mail is routed through a UNIX-to-UNIX Copy Program (UUCP) gateway.

Square brackets ( [ ] ) indicate an Internet address.

Angle brackets ( <> ) are ignored.

SMTP user names are case-sensitive.

SMTP host names are not case-sensitive.

You can use Internet addresses instead of host names.

5.3.2 Using SMTP-Style Addresses

If you use SMTP addressing schemes to address your mail, you must enclose the address specification in quotation marks. The following examples show how to use SMTP to route mail in a number of different ways.

• Local host

Note that in this case you do not need to enclose the host name in quotation marks.

• Routing

To route mail through a specific host to a user on a remote host, you could address the mail as follows:

MAIL>

To:

Another valid SMTP routing addressing scheme is as follows:

MAIL>

To:

In VMSmail format the address might look as follows:

MAIL>

To:

5-2 The Simple Mail Transfer Protocol

The first host listed is the routing host; the second host is the destination host.

• Internet addresses

You can only use Internet addresses in SMTP-formatted addresses. You can use Internet addresses anywhere you would normally use a host name. If you use Internet addresses, you must enclose the addresses in square brackets ( [ ] ), for example:

MAIL>

To:

5.3.3 Using Distribution Lists

The Applications implementation of SMTP enables you to send mail using distribution lists. You can use explicit, implicit, and remote distribution lists.

An explicit list uses SMTP-style addresses. It lists the addresses of the users to whom you want to send mail on the To: line. For example, to send mail to an explicit distribution list using SMTP, address the mail as follows:

MAIL>

To:

An implicit list uses the addresses collected in a file and uses the file name (or logical name) as the address when sending mail. To use implicit distribution lists, enclose the file specification in quotation marks. For example, you could create the file MY _GROUP. DIS that contains the following addresses:

srnith@abcxyz jones@xyzabc

ABCDEF: : FRANK

To send mail to everyone in the distribution list, you could use the name of the file for the mail address as follows:

MAIL>

To:

The distribution list cannot contain the names of other distribution lists.

SMTP also enables you to use distribution lists that exist on remote hosts. For example, if you are on HOST_X and the distribution list market_group exists on host-y, you could use the list to send mail by addressing the mail as follows:

MAIL>

To:

The system manager creates the system-wide distribution list used on the SMTP receiver.

5.3.4 Using the UNIX-to-UNIX Copy Program

The UNIX-to-UNIX Copy Program (UUCP) is an application that allows any system running UUCP to copy files to and from other systems running UUCP.

UUCP is usually used to copy files over a dialup connection, which involves connecting the systems by modem. To route mail to a host through UUCP, be certain that the general gateway is defined in the SMTP configuration.

To use SMTP to route mail to a system running UUCP, address the mail as follows:

MAIL>

To:

The Simple Mail Transfer Protocol 5-3

5.4 Using SMTP with Other Mail Features

SMTP allows you to use other VMSmail features, such as receiving mail, copying mail, and forwarding mail. The following sections explain how to use SMTP with these features.

• Receiving mail from SMTP

Receiving mail from SMTP takes place in the same manner as receiving VMSmail. You can use all the features of VMSmail (such as REPLY and FORWARD) to respond to the mail.

• Forwarding mail using SMTP

To forward mail to other users using SMTP, specify SMTP in the forwarding address. For example, address the mail as follows:

MAIL>

TO:

• Copying mail to other users

You can also specify SMTP when you copy mail you send to another user. For example, to send a copy of your mail message to user_l on hostl to USER_2, address the mail the following way:

MAIL>

TO:

CC:

• Setting FORWARD using SMTP.

If you move to a node that uses SMTP as the standard mail protocol, you can specify SMTP as the protocol to forward your mail to your new node. You need to set the remote address within three sets of double quotation marks (as shown in the example) because VMS strips two sets of quotation marks when parsing addresses. For example:

MAIL>

_Address:

MAIL>

Your mail is being forwarded toSMTP%"user_name@host"

5.5 Obtaining User Information

UCX commands allow you to obtain current SMTP information:

• REMOVE MAIL - Deletes the specified mail message from the SMTP queue.

• SEND MAIL - Requeues a mail message for delivery.

For reference information on how to use these commands, see the DEC TCP /IP Services for VMS UCX Command Reference manual.

5-4 The Simple Mail Transfer Protocol

6

Dans le document DEC TCP/IP Services for VMS (Page 36-40)