UNDELIVERABLE statement

Use the UNDELIVERABLE statement to indicate to CSSMTP the method used for handling undeliverable mail. See the information about common terms in z/OS Communications Server: IP Configuration Guide more details.

Syntax

Read syntax diagramSkip visual syntax diagramUNDELIVERABLEPut Braces and Parameters on Separate Lines
Put Braces and Parameters on Separate Lines
Read syntax diagramSkip visual syntax diagram{UNDELIVERABLE Parameters}
UNDELIVERABLE Parameters
Read syntax diagramSkip visual syntax diagramDeadLetterAction StoreDeadLetterAction StoreDeleteReturnToMailFrom YesReturnToMailFrom YesNoDeadLetterDirectory  /var/cssmtp/extwrtName/deadletter/DeadLetterDirectory  zOS_UNIX _directory_name

Parameters

DeadLetterAction
Indicates to CSSMTP the action to take when a dead letter is detected. A dead letter is an undeliverable mail notification that cannot be returned to the original sender or that an error report, if requested, could not be delivered to the mail administrators. This can occur if the MAIL FROM: value is null in the original spool file and it cannot be sent. See the information about common terms in z/OS Communications Server: IP Configuration Guide for a description of dead letter.
Delete
Indicates that CSSMTP should not save the dead letter to a z/OS® UNIX file system. If this option is chosen then it is recommended that you use the report statement. See the Sysout parameter in REPORT statement for information about recording original spool problems.
Store
Indicates that CSSMTP should store the mail message to the directory defined in the DeadLetterDirectory parameter. Each dead letter is stored as a separate file within the dead letter directory.
DeadLetterDirectory
The z/OS UNIX file system fully qualified directory name where CSSMTP creates the dead letter mail message that is stored when the DeadLetterAction parameter is set to Store. Valid values are 1 - 512 characters in length and must begin with a slash (/) to define the fully qualified directory. The default dead letter directory is /var/cssmtp/extWrtName/deadletter, where the extWrtName is the name used for ExtWrtName. See the information about common terms in z/OS Communications Server: IP Configuration Guide for a description of a dead letter.

Result: An ending slash (/) is added to the directory name if not configured.

ReturnToMailFrom
Indicates whether CSSMTP should create an undeliverable mail notification to be returned to the originator. The undeliverable mail notification contains the original mail message as well as additional information indicating the reason for the failure. This parameter does not apply to original mail messages that do not have the originator specified on the MAIL FROM SMTP command (for example, MAIL FROM:<>). In this case, if the original mail message cannot be sent, it immediately becomes a dead letter.
YES
CSSMTP creates the undeliverable mail notification to be returned to the originator with additional information regarding the reason for the failure.

Result: If the original spool file contains no errors other than undeliverable errors, the spool file is deleted.

NO
CSSMTP does not create the undeliverable mail notification to be returned to the originator. If you specify this parameter, you should use the REPORT statement with a value of sysout or admin.. See REPORT statement for information about how to create a report that the original mail message is undeliverable.

The action taken on the original spool file that contained undeliverable errors is based on the value configured on the BadSpoolDisp statement. See BadSpoolDisp statement for details.

Results:
  • If DeadLetterAction is set to Store:
    • If the DeadLetterDirectory parameter, to set the dead letter directory, is set to /userDirectory/deadLetterDirectory, then CSSMTP creates the userDirectory, deadLetterDirectory, or both in the z/OS UNIX file system if they do not already exist. The following name is the file name that would be used for the dead letter that is stored on the configured directory. The file name, TESTMAIL.SYS00006.Sep302008.160454.541437.1U, is constructed from the message ID of the mail message in the original spool file with the letter U appended and the fully-qualified host name removed. See the SMTP command and data command information in z/OS Communications Server: IP User's Guide and Commands for details about the Message-ID.

      The following sample shows a dead letter directory (/userDirectory/deadLetterDirectory) that contains two dead letters:

      Figure 1. Code sample
      /userDirectory/deadLetterDirectory/TESTMAIL.SYS00006.Sep302008.160454.541437.1U 
      /userDirectory/deadLetterDirectory/TESTMAIL.SYS00006.Sep302008.160454.541999.1U
    • If the configured dead letter directory already exists, then CSSMTP uses the existing directory.
    • If the directories cannot be created during parsing of the configuration file, CSSMTP generates a configuration error.