MVS E-Mail FAQ List

TBS Software Inc. is the author of SMTP-Send, a program for sending SMTP e-mail from IBM mainframes running MVS.

This FAQ is designed to answer common questions about sending e-mail from MVS.

What are my options for sending e-mail from MVS?
You can send e-mail from MVS (os/390 or z/OS) including CICS by coding the datastreams yourself or by using a third-party product to do it for you. IBM provides a simple REXX exec, SMTPNOTE to send simple text messages. XMITIP is a REXX freeware exec that sends e-mails from Batch or TSO/ISPF. SMTP-Send sends e-mails from Batch, TSO/ISPF and CICS For a comparison of SMTP-Send and XMITIP click here

What is SMTP? What is its purpose?
SMTP (Simple Mail Transfer Protocol) is a TCP/IP protocol used in sending and receiving mail. It is Internet's standard host to host mail transport protocol. It is defined by RFC821. Request For Comments (or RFC) documents are the written definitions of the protocols and policies of the Internet.

What is RFC822?
RFC822 is the standard for Internet Text messages. This standard specifies the syntax for text messages that are sent among computer users within the framework of "electonic mail" . RFC822 has been updated by various RFCs such as RFC1123, RFC1138, RFC1148, RFC1327, RFC2156

What is MIME and why is it important?
MIME is short for Multipurpose Internet Mail Extensions. MIME is defined and extended by many different RFCs. MIME allows the sending of binary and other complex messages such as HTML through the text based protocols of SMTP. Without MIME, the sending of attachments or in-line HTML would be impossible.
What does a SMTP data stream consist of?
The SMTP data stream consists of a series of RFC821 statements identifying the start of the SMTP conversation and the sender and recipients, followed by the message data. The message data usually includes a series of RFC822 message headers that describe the message to the receiving e-mail client. The actual message text follows the message headers.
A simple annotated example is below:


How can I send attachments?
SMTPNOTE can' t send attachments. Sending of attachments requires the data to be encoded so that the binary data can be transmitted across the network using the text-only SMTP protocols. The data itself must be encoded and MIME used to describe the attachment so that it can be recognized at the receiving end.
SMTP-Send can send attachments as can XMITIP.
To do it yourself, you need to encode the attachment (base 64 encoding is the most popular choice) and provide the necessary MIME headers to describe the attachment How can I prevent users from pretending to be someone else when they send mail?
SMTPNOTE creates the from e-mail address using the TSO user's Userid. If a complete SMTP datastream was created by a batch job and sent to IBM's SMTP server, that piece of mail can claim to be from whoever it wants to.
Some companies have used JES2 exit 31 (SSI allocation) to restrict who can use the Writer name of SMTP, based upon the program name and SAF (RACF) userid.
SMTP-Send provides a verification exit that allows companies to verify or replace the sender's address based upon the SAF id, and Jobname and other criteria.

How does SMTP-Send insulate me from the various Internet Protocols?
SMTP-Send uses RFC821 and RFC822 protocols to send mail but uses an easily understood and programmed control statement interface for specifying the information required by the RFC821 and RFC822 protocols. When binary data is being transmitted, SMTP-Send automatically uses the appropriate MIME protocols to preserve the data fidelity and ensure that the data arrives at the receiving end correctly.

Where can I get more information about the IBM SMTP Server?
The SMTP Server is packaged as part of the z/OS Communications Server. An excellent redbook on the MVS TCP/IP tasks is IBM z/OS V2R1 Communications Server TCP/IP Implementation Volume 2: Standard Applications
See http://www.ibm.com/software/products/en/commserver-zos for information about Communications Server maintenance.

Do I have to use the IBM SMTP Server?
The SMTP Server is supplied as part of the z/OS or OS/390 Communications Server. It performs a number of functions such as receiving incoming SMTP traffic and reading outgoing SMTP traffic from the JES Spool and sending it to its ultimate destination. If you don't want to accept inbound SMTP traffic, see "How do I prevent spammers from hijacking my SMTP Server" below.
For outgoing traffic only, use SMTP-Send's Spool Server. This program, like IBM's SMTP Server reads outgoing SMTP items from the JES Spool. Unlike the IBM SMTP Server, it does not attempt to deliver each piece of mail to it recipients. Instead it sends the entire SMTP datastream to a remote SMTP mail server (known as a relay server). Many organizations employ such a server, sometimes called a smart host, to act a central point for outgoing mail.

My SMTP server doesn't recognize the @ character in my e-mail addresses. How can I send mail?
The @ characteris defined as EBCDIC x'7C' in most but not all OS/390 codepages. The SMTP Server uses the @ symbol to separate the local part from the domain in e-mail addresses and expects the @ symbol to be x'7C'.
A recent fix to CommServer, PQ36249, addresses this issue allowing a different character to be used as the @ symbol.

How can I get my SMTP Server to relay all mail to another SMTP mail server?
The SMTP server can be instructed to relay all outgoing mail for which it cannot locate the host to another SMTP server. If the SMTP server is configured to not resolve any addresses, then all recipients will be unknown and you can direct the mail to another server.
  1. Copy your TCP/IP profile data set (DDname SYSTCPD in the SMTP started task) to a new data set.
  2. In your SMTP CONFIG data (DDname CONFIG in the SMTP started task) specify a IPMAILERADDRESS statement. The syntax is IPMAILERADDRESS xx.xx.xx.xx where the xx.xx.xx.xx is the numeric IP address of the target SMTP mail server.
  3. Comment out the NSINTERADDR statements in the copied SYSTCPD data set. This will prevent the SMTP server from using Domain Name Services to resolve the location of any e-mail address. SMTP will now only use the site table to resolve e-mail addresses into target host IP addresses.
  4. Change your SMTP started task JCL to use the altered copy of the TCP/IP parameters and the updated CONFIG data set .Restart your SMTP server. Any mail for which the IP address of the target host cannot be determined will now be redirected to the SMTP server named in the IPMAILERADDRESS statement.
  5. Or you can use SMTP-Send's Spool Server and skip steps 1 through 4.

How do I prevent spammers from hijacking my IBM SMTP Server?
How can I tell who's sending e-mails?
Using IBM's SMTP Server to accept the mail, you can turn on Logging and view the LOGFILE to see the headers from the e-mail traffic.
Using SMTP-Send you can write records to SMF, CICS journals or a sequential dataset which contain details about each email such as which user sent it, to which users, with how many attachments, what was the subject, what is the size and more.






[ Home | Products | Support | Contacts | Links ]