hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


HP TCP/IP Services for OpenVMS

HP TCP/IP Services for OpenVMS
User's Guide


Previous Contents Index

5.7 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 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]  

5.8 Forwarding Messages

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:

  1. From OpenVMS MAIL, use EXTRACT/NOHEADER to extract the mail message.
  2. Exit the MAIL program.
  3. Modify the file to include the SMTP commands. For example, put the address of the recipient into the RCPT TO:<> line. For more information about the SFF format, see Section 5.9.1.
  4. Send the file to SFF.

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:

  1. The return path of the mail
  2. The recipients
  3. The DATA command
  4. The RFC 822 message

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:

  1. The MAIL FROM command specifies the address to which the mail is bounced if necessary. There must be one and only one MAIL FROM command.
    You can specify a blank MAIL FROM command. For example:


    MAIL FROM:<> 
    

  2. The RCPT TO command specifies the address of a recipient. There must be at least one RCPT TO command but there can be more, one for each recipient.
    Do not specify a blank RCPT TO command.
    Each RCPT TO command must occupy a separate line and may contain only one address. If the mail is to go to multiple addresses, include one RCPT TO command for each address.
  3. The DATA command follows the last RCPT TO command; it flags the end of the RCPT TO commands and the beginning of the header block. The DATA command is required.

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:

5.9.3 SFF Security Measures

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:

5.10 Routing Mail with 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.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" 

5.10.1 Dialup Connections

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 

5.11 Management Commands for Mail

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.

Table 5-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.

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.

  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 shown in example 2:


    $ 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 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.11.2 Deleting Holding State Mail Messages from SMTP Queues

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.
  1. The following command 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. The following command removes all messages for your process's user name, or deletes everything in the SMTP queue if you have either SYSPRV or BYPASS privilege. The /NOCONFIRM qualifier prevents TCP/IP Services from prompting you for confirmation. Before deletion, TCP/IP Services copies this queued mail to the specified directory.


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

5.11.3 Releasing Holding State SMTP Mail Messages for Delivery

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 
 

5.12 Using Mail on Your PC

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:

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.

Note

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.

Table 5-2 OpenVMS Mail SET options
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