This document describes the cold or warm start up of SMTP.
Resolving The Problem
Note: New for V7R2 - An option has been added in CHGSMTPA called "Clear e-mail on start-up". Setting this attribute to *YES is equivalent to doing a cold start using the information provided below. If the data area described below is created at V7R2, SMTP no longer checks or removes it. V7R1 and earlier releases work as described below.
During SMTP start-up, SMTP may destroy distributions that it cannot process. How SMTP does this depends on the existence and contents of a single-character, user-defined data area called QTMSCLEAN in the QUSRSYS library. The character in this data area indicates the extent of mail control block clean-up:
|o||An uppercase or lowercase c in this data area indicates a cold start was requested to free all mail control blocks.|
|o||Any other character causes a warm start to free only the first floater mail control block found. A floater is an MCB (mail control block) that was de-queued but was not fully processed or failed processing when SMTP ended for some reason.|
Since a warm start frees only a single MCB, it may be necessary to stop SMTP, create the data area, and start SMTP more than one time to get to the MCB that is causing the problem. If there are a large number of MCBs, a cold start may be the fastest way to correct the problem.
To create the QTMSCLEAN data area, use the Create Data Area (CRTDTAARA) command.
Cold Start: The following command causes a cold start to occur and frees all the mail control blocks found the next time SMTP starts up.
Important Note: When a cold start occurs, all unprocessed SMTP distributions found in the system are destroyed and mail is lost.
On the operating system command line, type the following:
CRTDTAARA DTAARA(QUSRSYS/QTMSCLEAN) TYPE(*CHAR) LEN(1) VALUE('c') AUT(*ALL)
Press the Enter key.
If SMTP will not start due to MCH3601 on v5r4 there is a PTF available that will resolve this issue. The PTF for v5r4 is SI42817.
To cause a warm start and free only the first floater mail control block found the next time SMTP starts up, on the OS/400 command line type the following:
CRTDTAARA DTAARA(QUSRSYS/QTMSCLEAN) TYPE(*CHAR) LEN(1) VALUE('W') AUT(*ALL)
Press the Enter key. Once the clean-up is complete, code within SMTP deletes the QTMSCLEAN data area from library QUSRSYS (provided the data area was created using the *ALL authority).
18 December 2019