|
HP OpenVMS systems documentation |
Previous | Contents | Index |
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 copies to 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] |
You can forward any mail you receive to any internet host. Follow the
OpenVMS Mail conventions for forwarding mail.
5.9 SMTP SFF (Send From File)
SMTP allows you to create a mail message in a file and send it to the SMTP mailer to be delivered with headers you specify. Using this feature, you can create automated tools that compose and send mail messages. It is also useful for forwarding non-text files (MIME), because it prevents the mailer from encapsulating the MIME and SMTP headers in the body of a new mail message. Thus, SMTP can function like the redirect command on your personal computer, which simply takes the message as is, without encapsulating it in another message, and sends it to the person you name.
To redirect a MIME mail message without encapsulation so that it is readable to the receiver, follow these steps:
If you want headers like From:, To:, or Message-ID:, you must include
them in the file. SFF adds only the Received: header, as described in
Section 5.9.3.
5.9.1 Format of the SFF File
You can use SFF to send a text file that complies with RFC 822 by including commands (as described in RFC 821) preceding the RFC 822 message. MIME, by definition, complies with RFC 822; therefore, MIME mail can be delivered using SFF.
For example:
$ TYPE TEST_SMTP_SFF.TXT MAIL FROM:<green@abc.com> RCPT TO:<green@abc.com> DATA Date: Sun, 4 Aug 1996 14:48:14 -0400 Message-Id: <96080414481486@abc.com> From: green@abc.com (Charly Green - ABC-Corp engineering) To: green@abc.com Subject: Test of SFF mechanism This is the message text. |
The SMTP protocol commands specify:
The commands that precede the RFC 822 messages must appear in the file in the order listed above. The MAIL FROM and RCPT TO commands form the "envelope," as described in RFC 821 and summarized as follows:
MAIL FROM:<> |
Do not include a Return-Path header in the RFC 822 headers. If the mail
is to be delivered locally, SMTP includes a Return-Path header based on
the MAIL FROM command. If the mail is relayed to another SMTP host, the
return path is determined by the MAIL FROM command on the final
destination host.
5.9.2 SFF File Requirements
The mail message file can be in either of the following formats:
The ability to create messages with arbitrary headers could be used to spoof message headers. To limit this, the SFF mechanism adds a Received: header to the headers you supply. This tells you the origin of an attempted spoofed message.
You can invoke SFF from an application or from DCL, as described below.
5.9.4 Invoking SFF from an Application
TCPIP$SMTP_MAILSHR.EXE contains a routine called TCPIP$SMTP_SEND_FROM_FILE. This routine is declared as follows:
unsigned int TCPIP$SMTP_SEND_FROM_FILE(infile_name,logfd,log_level) char *infile_name; FILE *logfd; int log_level; |
The arguments for this routine are:
To call the routine, link with TCPIP$SMTP_MAILSHR.EXE/SHARE.
5.9.5 Invoking SFF from DCL
The SMTP_SFF command allows you to invoke SFF. To define SMTP_SFF as a foreign command so that you can use it from DCL, enter the following command:
$ SMTP_SFF:==$TCPIP$SYSTEM:TCPIP$SMTP_SFF.EXE |
This command takes UNIX style parameters and passes them to SFF.
The command format is:
SMTP_SFF infile_name [-log logfile_name] [-loglevel log_level] |
Where the parameters to this command are:
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.10.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" |
Ask your system manager whether you need to specify a gateway host in mail addresses when you work on 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 |
Table 5-1 describes the management commands you can use to work with SMTP mail messages currently in a queue. Type these commands at the TCPIP> prompt.
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. |
The following sections describe how to use these commands. For full
command descriptions, refer to the HP TCP/IP Services for OpenVMS Management Command Reference.
5.11.1 Displaying SMTP Mail Status Information
Use the SHOW MAIL command to display the following information about SMTP mail:
The following examples show how to display SMTP mail status information.
$ TCPIP SHOW MAIL /ENTRY=826 SMTP Mail Queue Entry 826 User: MARLOW File: _PLUTO$DKD0:[MARLOW]970207015114579_MARLOW.TCPIP_PLUTO;1 Status: Processing |
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: ??? |
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).
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. |
$ TCPIP REMOVE MAIL /ENTRY=828 _PLUTO$DKD0:[MARLOW]970207015114580_MARLOW.TCPIP_PLUTO;1? y |
$ TCPIP REMOVE MAIL /NOCONFIRM /COPY=[MARLOW.OLD_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 |
You can use either the Post Office Protocol (POP) or the Internet
Message Access Protocol (IMAP) to access OpenVMS mail from your PC.
5.12.1 POP
With SMTP and the Post Office Protocol (POP) functionality, you can receive and send OpenVMS mail on your PC.
POP is a mail repository that accepts and stores your mail even when the PC is turned off. At your request, the POP server reads mail from your OpenVMS NEWMAIL folder, then moves the mail to your MAIL folder.
To send and receive mail on your PC, make sure the system manager has configured the POP server for use on your PC (the POP client system).
To set up your POP client account, use one of the following methods:
$ SET DEFAULT USER$DISK:[JONES.MAIL] $ CREATE POP_SECRET.DAT xyztancreff [Ctrl/Z] $ SET FILE/PROT=(s,w,g,o:rwed) POP_SECRET.DAT |
For more information about the POP process, including information about
how POP builds SMTP-compliant mail headers, refer to the HP TCP/IP Services for OpenVMS Management
guide.
5.12.2 IMAP
The IMAP server allows users to access their OpenVMS Mail mailboxes by clients such as Microsoft Outlook so that they can view, move, copy and delete messages. The SMTP server provides the extra functionality of allowing the clients to create and send mail messages.
For information about configuring and managing the IMAP server, refer
to the HP TCP/IP Services for OpenVMS Management guide.
5.12.2.1 How to Access Mail Messages Using IMAP
To access mail messages from the IMAP server, configure a user name and password into your client mail application. If an account is accessible without a password and a password is provided, the password is ignored.
In OpenVMS Mail, a user's mailbox file is, by default, named MAIL.MAI and resides in the user's default OpenVMS directory. In most cases, the user name to be configured is the user's OpenVMS account name.
An OpenVMS Mail user is allowed to have many mail files; a special syntax for the user name is defined so that the user can specify the set of mail files to be opened. This syntax is the user's OpenVMS account name followed by a percent sign and then partial file specifications of the mail files, each separated by a percent sign. Note the following:
In the following example, user SMITH has three mail files in a mail directory. One is the user's default MAIL.MAI file, and the others are ACCOUNTS.MAI and PRIVATE.MAI. The user name would be configured as follows in the IMAP client:
SMITH%ACCOUNTS%PRIVATE |
Your client system opens the TCP connection and attempts to access the server by entering the IMAP LOGIN command with the configured user name and password. On successful connection, your mail files are the top level of mailboxes. In the preceding example, the mailboxes displayed will be Mail, Accounts, and Private. Unsuccessful attempts are logged in the event log file (described in the HP TCP/IP Services for OpenVMS Management guide).
Once you have successfully connected to the IMAP server, a text file called TCPIP$IMAP_MAILBOXES.DAT is created in your OpenVMS Mail directory. This file contains a record of the mailbox files that you specified, as well as a line-separated list of partial file specifications. Your mail directory and the .MAI file extension are appended to the partial file specification.
When you change your default OpenVMS Mail directory with the OpenVMS Mail command SET MAIL_DIRECTORY, you must manually copy the TCPIP$IMAP_MAILBOXES.DAT file from your old default directory to your new default directory to use the list of folders specified in the TCPIP$IMAP_MAILBOXES.DAT file in the old directory. The OpenVMS Mail command SET MAIL_DIRECTORY is not aware of the TCPIP$IMAP_MAILBOXES.DAT file and does not copy it from the old directory to the new one. |
The next time you connect to the IMAP server, you can (optionally) remove percent signs and mailbox names from the user name field, because they are recorded permanently in the TCPIP$IMAP_MAILBOXES.DAT file.
You can add extra mailbox names in a later connection. The TCPIP$IMAP_MAILBOXES.DAT file is automatically updated.
The IMAP client software can create and delete mail files in your directory, either automatically, as in the creation of a "Deleted Items" mailbox, or as specified by the user.
The system manager can provide every user on the system with a
preloaded tree of mailboxes by copying to each user's mail directory a
preformatted copy of TCPIP$IMAP_MAILBOXES.DAT.
5.12.2.2 OpenVMS Mail Configuration
Table 5-2 describes the way the OpenVMS Mail SET options affect the operation of IMAP.
Option | Description |
---|---|
AUTO_PURGE |
IMAP clients have their own purge command, often called Compact or
Compress. When a message is purged from a non-Wastebasket mailbox, it
is put in the OpenVMS Mail Wastebasket. If the Wastebasket itself is
purged, the messages are permanently deleted (equivalent to OpenVMS
Mail PURGE), and disk space is then reclaimed as soon as the IMAP
client disconnects. This occurs regardless of the AUTO_PURGE setting,
which has no effect for an IMAP client.
Any messages that are permanently deleted by an IMAP client briefly appear in your Wastebasket, but those messages are not visible from the IMAP client and are purged each time the client disconnects from that mail file. |
CC_PROMPT | Not applicable. |
COPY_SELF | Not applicable. |
EDITOR | Not applicable. |
FILE | Not used. Instead, you can configure all mail files to be available simultaneously by setting the user name in the IMAP client configuration. You cannot copy or move messages between different mail files. |
FOLDER | Not applicable. |
FORM | Not applicable. |
FORWARD | This is not applicable to the IMAP server, but setting a forwarding address results in messages being forwarded by OpenVMS Mail before being seen by the IMAP server. |
MAIL_DIRECTORY | The directory, with an extension of .MAI, forms the partial file specification used to complete the file names of mail files using the values supplied as part of the user name in the IMAP client configuration. See Section 5.12.2.1 for details. |
PERSONAL_NAME | Not applicable. |
QUEUE | Not applicable. |
SIGNATURE_FILE | Not applicable. |
WASTEBASKET_NAME | This folder is always displayed by the IMAP client, even if it is currently empty. |
Previous | Next | Contents | Index |