MAIL1.

How do I send Internet mail?

The simplest answer on most OpenVMS V6.2 and later systems: just enter the Internet (SMTP) address at the "To:" prompt in MAIL. On most such systems, this will send your email to the specified recipient.

That said, there is no one answer to this question. Internet mail is built upon the TCP/IP protocols, which are not directly supported by OpenVMS - support requires the installation of a package that understands TCP/IP and specifically one that provides the Simple Mail Transport Protocol (SMTP).

A number of implementations of TCP/IP are available for OpenVMS - from Compaq, from third parties, and even a free "support it yourself" form. The MAIL program that comes with OpenVMS does not directly support the mail protocol used on the Internet (though it does recognize SMTP addresses in V6.2 and later), but various programs have been written that use MAIL's "foreign protocol" facility to provide such support - these tools are called transports. To send mail through a transport, place the transport specifier at the front, and (typically) quote the address.

For example, IN%"hoffman@bogushost.compaq.com" - you must include the quotation marks - indicates that IN transport will be used to send the mail to the address hoffman@bogushost.compaq.com. Common names for the transport are IN%, MX%, and SMTP%. (MX is a widely used, free, mail handler; see question SOFT1. SMTP% is used by Compaq's TCP/IP Services product.) Other systems may use some other name. If none of these prefixes work, please ask your system manager for assistance.

					[leichter@lrw.com]
					[Stephen Hoffman]

See also MAIL2



MAIL2.

How do I get IN% or MX% added automatically to Internet addresses?

Get the MAILSHR_PATCH package (there's one each for VAX and Alpha) from the WKU FILESERV server (see question SOFT1.)

As of OpenVMS V6.2, this is not necessary - if the address has an @ in it (not in a quoted string), MAIL will look to see if the logical name MAIL$INTERNET_TRANSPORT is defined. If it is, it will use the translation as the transport protocol, otherwise it will use SMTP (as is used by UCX). For example, if you wanted IN% added, you'd define MAIL$INTERNET_TRANSPORT as "IN".



MAIL3.

How do I automatically append a signature file to my mail messages?

OpenVMS 7.0 adds the ability to automatically append signature files - in MAIL, use the SET SIGNATURE command to specify a signature file name. For earlier versions, see the following paragraphs.

The basic MAIL utility which is shipped with VMS does not have an intrinsic mechanism for adding signature files. If you're using an enhanced mail handling package (e.g PMDF), however, it may have provisions for adding signature files to all messages it handles - check the documentation for details. In addition, it's common practice to use an editor to handle addition of quotation marks (e.g. ">") and signature files to mail messages and news postings. There are several implementations of this for different editors available on the net; for one example, see the MAIL_EDIT package available at:

  ftp://narnia.memst.edu/mail_edit_v1-4.zip

					[bailey@genetics.upenn.edu]
Define the logical MAIL$EDIT to a COM-file, which looks something like the following:
$ IF P1 .NES. ""
$ THEN
$    COPY 'P1',[signaturefile] 'P2'
$ ELSE
$    COPY [signaturefile] 'P2'
$ ENDIF
$ DEFINE/NOLOG SYS$INPUT SYS$COMMAND
$ [editorname] 'P2'
$ EXIT

Where [signaturefile] is the name of the signature-file (including directory and disk) and [editorname] is EDIT/EDT or EDIT/TPU (or your favorite editor).
					[Arne Vajhøj] 



MAIL4.

Do I have to use VMS MAIL? I like my Unix mailer better.

Several Unix mailers have been ported to VMS, some by the vendors of specific TCP/IP packages, some by users who have made them freely available. See the documentation for your TCP/IP package, and refer to question SOFT1 for information about the availability of the free ports.
					[Jerry Leichter]



MAIL5.

How can I forward my mail? Can I forward it to an Internet address?

You can use the SET FORWARD command within MAIL to specify where you want all your mail forwarded to. Use SHOW FORWARD to see your current forwarding. To cancel all forwarding, type SET NOFORWARD.

You can forward your mail to an Internet address, but you have to be careful because of the way MAIL handles special characters, such as quotation marks. First, determine the address you would use to send mail to the place you want to forward to - say, IN%"fred@fred-host.xxx.com". Take that string and double all the quotation marks, producing IN%""fred@fred-host.xxx.com"". Finally, wrap quotation marks around the outside and use the the result with SET FORWARD:

	MAIL> SET FORWARD "IN%""fred@fred-host.xxx.com"""
If you do SHOW FORWARD, you should now see:
	Your mail is being forwarded to IN%"fred@fred-host.xxx.com".

					[Jerry Leichter]
Note that the MAIL$INTERNET_TRANSPORT feature doesn't yet work with SET FORWARD in that you'll still have to use the syntax above with the quotation marks.



MAIL6.

How can I forward my mail to a list of addresses?

VMS MAIL does not support forwarding a message to more than one address. (Older versions of MAIL allowed you to specify such forwarding, but it never worked correctly.)

Many of the TCP/IP mail packages support forwarding to mailing lists, as does the free MX mail handling system and the DELIVER mail "extender". See the documentation of your TCP/IP package and question SOFT1.

					[Jerry Leichter]



MAIL7.

MAIL keeps saying I have new messages, but I don't. What do I do?

The count of new mail messages is kept separately from your mail folder in SYS$SYSTEM:VMSMAIL_PROFILE.DATA. It sometimes happens that this count differs from what's in your mail folder. If this happens, go into MAIL and repeat the READ/NEW command until you see no new mail messages. Then enter the command one more time. This will resynchronize the counters.



MAIL8.

How do I move all of my mail messages to another system?

If you are moving to another OpenVMS system, perhaps the best way is to select each folder and do (in MAIL)
	EXTRACT/APPEND/ALL/MAIL mymail.mai

Move MYMAIL.MAI to the other system, then do this (in MAIL):
	SET FILE mymail.mai
	COPY/ALL foldername MAIL.MAI
This will place a copy of all of your messages in the given folder. If you wanted to maintain the separate folders, do separate EXTRACT commands (above) specifying different .MAI files, then repeat the SET FILE, COPY for each one.

If you are moving to a non-OpenVMS system, the EXTRACT command above can be used to create a file which you can then copy - how you import it into your mailer is an exercise left to the reader.



MAIL9.

How do I send or read attachments in VMS MAIL?

Is there any way to send or read mail with files as attachments from VMS?

Not directly with the OpenVMS MAIL facility, but there are several other options:

  1. Install PINE, available commercially from Innosoft (www.innosoft.com) or free from Andy Harper. With PINE you can both send and receive MIME messages, if you have the appropriate viewers available.
         http://www.innosoft.com/
         http://www.agh.cc.kcl.ac.uk/files/vms/pine-vms/
         ftp://ftp2.kcl.ac.uk/pub/vms/pine-vms/
    

  2. If you're working from an X11 server use the OpenVMS version of Netscape Navigator. This option is ok for sending mail, but is not optimal for reading it, since Netscape will use POP and remove messages entirely from the OpenVMS MAIL system, which is not generally what you want.
  3. MPACK/MUNPACK. To send a MIME mail, construct the message with attachments manually using MPACK. You cannot send the resulting file directly through MAIL because an extra blank header line will be inserted between your message and the OpenVMS MAIL headers, which will cause the message to appear as plain text in most mail programs. Some TCP/IP stacks provide a work around for this problem, and if that doesn't work, you should generally be able to force the message directly into the SMTP port of your mail machine. Examples of both methods are in: http://seqaxp.bio.caltech.edu/pub/SOFTWARE/mmail.com
  4. With OpenVMS V7.2 and later, use the supplied MIME tool.

To read a MIME mail message, open it in MAIL, extract it to a file, then use MUNPACK to break out and decode the attachments.

					[David Mathog]



Next Back