directmail / directspool / pdfenhancer - Troubleshooting

Table of contents

Check license

Toolmaker's own parts of the software

The licenses for the part of the software developed by Toolmaker itself are checked with the DSPLICINFO command. See Lizenzdatei prüfen.

Spool-a-matic

The product Spool-a-matic from Gumbo Inc, is integrated in directspool/directmail.

After installation, there is a grace period of 30 days during which no license is required. After the 30 days there will be an error message.

The license check is done with the command CHKSAMAUT:

  1. ADDLIBLE SPLAMATIC
  2. CHKSAMAUT

The system displays a message in the message line indicating the status of the license.




Bibliotheken und Verzeichnisse für directmail / directspool / pdfenhancer



Determine version

IBM i version

GO LICPGM, selection 10, key F11

directspool version

DSPDTAARA DIRMAIL/PRDREL

WOPiXX

Configuration commands

CFGDIRMAIL

Start/Stop commands

STRDIRMAIL or STREMLMON

ENDDIRMAIL or ENDEMLMON commands

Subsystem and jobs

Subsystem DIRMAIL with the jobs:

DMATM DIRMAIL STACK ACTIVE PGM-DMATMMON
DMATM01 DIRMAIL STACK ACTIVE PGM-DMWRKMON
DMDST DIRMAIL STACK ACTIVE PGM-DMDSTMON
DMRCV DIRMAIL STACK ACTIVE PGM-DMRCVMON
DMSND01 DIRMAIL STACK ACTIVE PGM-DMOUTMON
and if necessary further
DMSNDxx

Logs/Protocols/Dumps

  • CFGDIRMAIL F4, F9 and on the last page TRACE(*YES) - turns tracing on - the trace is active immediately, until the next restart of directmail by ENDDIRMAIL / STRDIRMAIL.
    • To activate the trace permanently, directmail must be terminated with ENDDIRMAIL before activating with TRACE(*YES) and restarted with STRDIRMAIL after the change
    • Please also note the information about tracing in the description of the command CFGDIRMAIL.
  • CHGDTAARA DTAARA(DIRMAIL/DMDTAARA (1218 1)) VALUE('1') - turns on the trace for client control - After that please execute ENDDIRMAIL / STRDIRMAIL once

When you have all the information together, then the traces should be turned off again. Again followed by an ENDDIRMAIL / STRDIRMAIL.


The trace data can be found in the IFS of the IBM i in the directory

/Toolmaker/DirectMail400/Debug:

AutoMail.txt Processing of queues - search for mail to be sent
AutoMail001.txt Queue Processing - Analysis of a SPLF
DMRCV_120556.txt Reception
DMSND01_120555.txt Sending
SMTP_trace_120555.> Complete trace of the SMTP autochange


Log files

  • DSPPFM DIRMAIL/RPRT


Other commands on IBM i

WRKEML - selection 25 for the error mail to show the protocol

Check PRTPDF tray control

Test for tray control (only with Toolmaker commands)

1. Make hardcopy of an iSeries menu (do not print). This SPLF is used in point 2.

2. Use the following command to create a PDF file from the previously created hardcopy:

CVTSPLF OBJ('/Toolmaker/TestFachsteu1.pdf') FILE(QSYSPRT)
JOB(nnnnnn/name/job) SPLNBR(n) FORMAT(*EPDF) GREENBAR(*NO)
PAGETABLE(*NO) PAPERSIZE(*A4) ROTATION(*NO)
CPI(15) LPI(6) PDFAREA(10)

3. For each of the DRAWER codes 1 to 10 execute the following command:

PRTPDF OBJ('/Toolmaker/TestFachsteu1.pdf') OUTQ(outqname)
SPLFNAME(TESTJW) HOLD(*YES) SAVE(*YES) USRDTA(TEST)
DRAWER(1) DRAWER2(1) DUPLEX(*NO)

PRTPDF OBJ('/Toolmaker/TestFachsteu1.pdf') OUTQ(outqname)
SPLFNAME(TESTJW) HOLD(*YES) SAVE(*YES) USRDTA(TEST)
DRAWER(2) DRAWER2(2) DUPLEX(*NO)

etc.

4. The spool files are now in HOLD in the OUTQ. Reserve the printer for itself and put colored or marked paper in paper tray 2.

5. Then release one SPLF after the other. Immediately note at which SPLF number the paper was pulled from which tray.

6. The test spool files remain in the OUTQ in the SAV status. This makes it easy to repeat the test.

Sending a printer file (SPLF) "in the original" to the hotline

Occasionally, the hotline needs a printer file for analysis, exactly as it exists as an SPLF on your system.

With the output format *ORIG directmail offers the possibility to transfer a SPLF directly from an output queue into a mail and send it to us.

Please make sure that there is no sensitive data in the printer file to be sent.

Please proceed as follows:

  1. WRKMBX
    1. Select 8 for a mailbox that works (from which you can send something)
  2. F6 (Create)
    1. To hotline@toolmaker.de
    2. Subject: SPLF for analysis
    3. F10 (Attachments)
  3. Select 2nd spool files
    1. Select the correct one with 1
    2. Important: Select output format *ORIG


4. In the "Work with attachments" display - press F3

5. In display "DirectMail/400 - Edit mail" - press F3

6. In the "Send mail" display

a Save e-mail = Y

b Send e-mail = Y

c Enter

After that, please check if the mail went out

7. Selection 1 for ". Sent"

a If you find the mail in the list, then all is well

Troubleshooting for SplAmatic from the company Gumbo

For converting IBM i -SPLF to PDF files we use the product SplAmatic from the company Gumbo Inc. (option DIRMAILG).

Copying an IBM i SPLF to the PC for sending to the Gumbo-helpdesk

For troubleshooting the helpdesk there needs the problematic SPLF. The following instructions show how to do this:


1. Find the SPLF you are concerned about (with WRKSPLF, WRKOUTQ or any other appropriate command)

2. Selection 8 for that SPLF and note this information:

a File (is in the upper right corner) - in the following we call this parameter "spool filename
b Job (top left) - in the following we call this parameter "job name
c User (left, second from the top) - in the following we will call this parameter "job user
d Number (leftthird from the top) -- in the following we call this parameter "job number"
e Number (right, second from the top) - in the following we call this parameter "spool file number


3. ADDLIBLE SPLAMATIC

4. CRTSPLSAVF (F4) (F11) - fill in the parameters with the fields from above like this:

a. FILE - spool file name
b. SAVF - DMDEBUG and QGPL
c. JOB - job name and job user and job number
d. SPLNBR - spool file number


then please transfer the QGPL/DMDEBUG backup file to your PC and email to hotline@toolmaker.de

Transferring a SAVF from the IBM i to the PC via FTP

If you don't already have your own ways to do this, such as FileZilla or TotalCommander, please follow Gumbo's instructions:

Once a spool save file has been created using the Create Spool Save File (CRTSPLSAVF) command you can download it to your PC and email it to GUMBO by following these steps

1. Insure the FTP server is active by running

STRTCPSVR SERVER(*FTP)

2. Choose Start > Programs > Accessories > Command Prompt to open a command prompt

3. Create a temporary directory and change to it
a md c:\gumbo [Enter]
b cd c:\gumbo [Enter]

4. Open an FTP connection to IBM i by substituting your systemʹs host name and running
a ftp host_name [Enter]

5. Enter a user name and password as prompted
6. Change to binary (image) mode by running
a bin [Enter]

7. Change to library/file/member mode by running
a cd /qsys.lib/qgpl.lib [Enter]
b quote site namefmt 0 [Enter]

8. Download the spool save file by running (in this example the save fileʹs name is QGPL/TEST)
a get qgpl/dmdebug [Enter]

9. End the ftp session and the command prompt by running
a quit [Enter]
b exit [Enter]
c
10. Send email to hotline@toolmaker.de



Hotline cases

After correcting a problem: reactivate all mails in the Error folder

There are problems that cause some (up to many) mails to end up in the Error folder and get the status Err. When the problem is fixed, these mails will not be resent automatically.

However, it is possible to resend all mails with status Err in the folder Error folder, i.e. to move them to the Outbox folder and assign the status Scd. This is done with the (hidden) resend (selection 98) for the folder Err

Emails sporadically arrive multiple times at the recipient - due to "tarpitting" of the SMTP server (21000005)

Problem

Recipients report that they have received emails multiple times.

In the sent folder of the mailbox you get a display similar to this with the selection 25:

4 attempts

  • 3x ERR (07:40:27 / 07:45:28 / 07:50:54)
  • 1x OK (07:56:00)

This mail has reached the recipient 4 times.

If tracing is enabled(CFGDIRMAIL TRACE(*YES) ) then you will find IFS directory /Toolmaker/DirectMails400/Debug Files with the name "DMSND_xxxx.txt". In these files you can find the communication between directmail and the SMTP server (in this case an Exchange server).

SMTP commands on successful sending
07:56:00 – die "Erfolg"-Nachricht "250 2.6.0" kommt sofort

2021-02-17T06:55:59.700Z,<,MAIL FROM: <infoxxx@yyyyyyyyyyyy.de>,
2021-02-17T06:55:59.700Z,18,*,08D8BA49A5C71285;2021-02-17T06:55:54.677Z;1,receiving message
2021-02-17T06:55:59.700Z,19,>,250 2.1.0 Sender OK,
2021-02-17T06:55:59.700Z,20,<,RCPT TO: <abcxde@yyyyyyyyyyy.de>,
2021-02-17T06:55:59.700Z,21,>,250 2.1.5 Recipient OK,
2021-02-17T06:55:59.700Z,22,<,DATA,
2021-02-17T06:55:59.700Z,23,>,354 Start mail input; end with <CRLF>.<CRLF>,
2021-02-17T06:56:00.480Z,24,*,Tarpit for '0.00:00:00.561' due to 'DelayedAck',Delivered
2021-02-17T06:56:00.480Z,25,>,250 2.6.0 <1HF8JFA5K72366DF7@aaaaaa.yyyyyyyyyy.DE> [InternalId=85814] Queued mail for delivery,
2021-02-17T06:56:00.480Z,26,<,QUIT,
2021-02-17T06:56:00.480Z,27,>,221 2.0.0 Service closing transmission channel,
2021-02-17T06:56:00.480Z,28,-,,Local


SMTP commands on unsuccessful attempt (in this case the sequence comes 3 times)
07:45:28 – ERR die Msg "250 2.6.0" kommt erst nach 30 Sekunden - Da hat ist aber der timeout von directmail (default: 20 Sekunden) abgelaufen

2021-02-17T06:45:03.756Z,0,+,,
2021-02-17T06:45:03.756Z,1,*,SMTPSubmit SMTPAcceptAnyRecipient SMTPAcceptAnySender SMTPAcceptAuthoritativeDomainSender AcceptRoutingHeaders,Set Session Permissions
2021-02-17T06:45:03.756Z,2,>,"220 xxxSMAIL03.yyyyyyyyydis.intra Microsoft ESMTP MAIL Service ready at Wed, 17 Feb 2021 07:45:02 +0100",
2021-02-17T06:45:03.756Z,3,<,EHLO BIEAS.yyyyyyyyy.DE,
2021-02-17T06:45:03.756Z,4,>,250-xxxMAIL03.yyyyyyyyydis.intra Hello [172.31.1.2],
2021-02-17T06:45:03.756Z,5,>,250-SIZE,
2021-02-17T06:45:03.756Z,6,>,250-PIPELINING,
2021-02-17T06:45:03.756Z,7,>,250-DSN,
2021-02-17T06:45:03.756Z,8,>,250-ENHANCEDSTATUSCODES,
2021-02-17T06:45:03.756Z,9,>,250-STARTTLS,
2021-02-17T06:45:03.756Z,10,>,250-AUTH,
2021-02-17T06:45:03.756Z,11,>,250-8BITMIME,
2021-02-17T06:45:03.756Z,12,>,250-BINARYMIME,
2021-02-17T06:45:03.756Z,13,>,250 CHUNKING,
2021-02-17T06:45:03.756Z,14,<,RSET,
2021-02-17T06:45:03.756Z,15,*,Tarpit for '0.00:00:05',
2021-02-17T06:45:08.763Z,16,>,250 2.0.0 Resetting,
2021-02-17T06:45:08.763Z,17,<,MAIL FROM: <mmmmm@yyyyyyyyy.de>,
2021-02-17T06:45:08.763Z,18,*,08D8BA49A5C71251;2021-02-17T06:45:03.756Z;1,receiving message
2021-02-17T06:45:08.763Z,19,>,250 2.1.0 Sender OK,
2021-02-17T06:45:08.763Z,20,<,RCPT TO: <aaaaaaa@yyyyyyyyy.de>,
2021-02-17T06:45:08.763Z,21,>,250 2.1.5 Recipient OK,
2021-02-17T06:45:08.763Z,22,<,DATA,
2021-02-17T06:45:08.763Z,23,>,354 Start mail input; end with <CRLF>.<CRLF>,
2021-02-17T06:45:38.309Z,24,*,Tarpit for '0.00:00:17.206' due to 'DelayedAck',Delivered
2021-02-17T06:45:38.309Z,25,>,250 2.6.0 <1HF8JFA5K72366DF7@xxxxx.yyyyyyyyy.DE> [InternalId=85784] Queued mail for delivery,
2021-02-17T06:45:38.309Z,26,-,,Remote

Solution

Feedback from the Exchange server administrator: "The keyword here is tarpitting. This is an early type of AntiSpam detection. The default values here are five seconds to wait for feedback from the sending system and a timeout of 30 seconds. This results in the value of the delay, which can be found in the log. During this time, no data is accepted from the server."

For more information: https://social.technet.microsoft.com/Forums/exchange/en-US/2d2ff7d0-742e-452c-8bce-d930c9335bdb/receive-connector-message-tarpit-for-0000009675-due-to-delayedackdelivered.

  • Solution on the exchange server:

Set-ReceiveConnector "Default connector (server name)" -MaxAcknowledgementDelay 0

But: "Reducing the value to zero seconds is not recommended, but would fix the cause. I suggest we reduce the value to five seconds and test."

  • Solution on the IBM i:

Set the timeout from 20 seconds to a higher value (e.g. 40). The value is set in DTAARA-DIRMAIL/DMDTAARA at location 431 (3 digits long) and can be changed like this:

CHGDTAARA DTAARA(DIRMAIL/DMDTAARA (541 3)) VALUE('040')

This should help in the combination at the latest.

CPF4168 for WRKATMDEF -selection 2 (18030178)

Problem

WRKATMDEF - selection 2: the screen flashes only briefly and the system returns to the ATMDEF overview.

In the job log, you will find a CPF4168: error on unit or at site QPADEV00003....

WRKDEVD <name_of_screen_unit> shows type 3179.

Solution

The 5250 emulation was set to 24x80 characters. After changing it to 27x132 it worked.

This changes the type of the screen unit to 3477.

MSF was used for sending (18030183)

CFGDIRMAIL SMTSVR(*AS400) - resulted in outgoing mails from a mailbox being sent via the Message Server Framework (MSF), although a "real" SMTP server was configured in the mailbox itself.

  • in the mailbox they were displayed as sent
  • but did not reach the recipient
  • the SMTP log in the debug directory showed nothing
  • DSPMSG QSYSOPR returned messages indicating QMSF_... ..

But it was also configured:

WRKMBX - Selection 2, Page 2: SMTP Server: *SYSVAL

We entered CFGDIRMAIL SMTPSVR(smtp.strato.de) with SMTPAUTH(*LOGIN) and user/password.

After that it worked.

SPLF for a newly created automail/directspool definition are not processed

Problem

A definition is supposed to process SPLF that appear in a specific output queue (OUTQ), but does not do so.

Solution

The OUTQ must be stored in output queues to be monitored for directspool/automail:

WRKATMDEF, F22

For further hints see: WRKATMDEF, F22 - Monitor output queues

Mailbox display: "No valid record for display", although a number is displayed in the upper area

Problem

A number of entries for a folder is displayed in the upper area, but when the folder is called, there are no entries.


Solution

With Selection 99 reorganize the folder.

Wrong sender for the sent mails

From version 5.60, PTF 09

Problem

In the mails, the email address stored in CFGDIRMAIL EADRTMST(..) is specified as the sender. This means that recipients cannot reply by "Reply" in a meaningful way.

Solution

If no Microsoft Office 365 - server is used as SMTP server, then this command helps:

CHGDTAARA DTAARA(DIRMAIL/DMDTAARA (1279 2)) VALUE('_F')

then restart (ENDDIRMAIL/STRDIRMAIL)

Background

The SMTP servers of Microsoft Office 365 (smtp.office365.com) have a slightly different way of handling SMTP tags. In PTF 09 version 5.60 directmail was adapted for this.

But this way does not work with many other SMTP servers. They interpret the SMTP tags wrong. By changing the DMDTAARA at position 1279 to '_F' the previous way of SMTP communication is set again.

For further hints see PTF 09 vom 26.08.2020 on the new features page for directmail.

Error "GSKit not found" when sending mail via Office 365

Please make sure that a certificate store with the name "DEFAULT.KDB" exists:

See Einen Zertifikatsspeicher im Bereich *SYSTEM erstellen

Emails do not go 'out' after provider has switched to TLS 1.2

Symptom

All emails go to the "Error" folder and there is a message in QSYSOPR and in selection 25 for the particular email that no connection could be established to the SMTP server.

Analysis

The provider - in this case Strato - had disabled TLS protocols on the SMTP server before TLS 1.2. The SMTP.STRATO.DE server requires at least TLS 1.2.

In the file /Toolmaker/directmail400/debug/DMSND01_xxxx.TXT you can find these entries:

SMTP server response on error
2021.08.12 08:32:00 SND: STARTTLS                                                                                                   
2021.08.12 08:32:00 RCV: 220 Ready to start TLS                                                                                     
2021.08.12 08:32:00 Result: ERR myuser@acme.com 12-08-21   08:32:00                                                                    
2021.08.12 08:32:00 Error: ERR0053 Verbindung zu Server "SMTP.STRATO.DE" konnte nicht hergestellt werden. (Mailbox: ALPHA Account: *
2021.08.12 08:32:00 Result:     Verbindung zu Server "SMTP.STRATO.DE" konnte nicht hergestellt werden. (                            

Problem cause

The IBM i of the customer runs under V7R1M0. TLS 1.2 is not yet included in the base of this version, it has to be installed and configured afterwards.

Solution

  1. Make sure that at least version 5.50.05 of directmail is installed(DSPDTAARA DIRMAIL/PRDREL)
  2. Make sure that at least the TR 6 for V7R1M0 is installed(WRKPTFGRP SF99707)
  3. Execute steps 1) and 2) of the document https://www.ibm.com/support/pages/node/645203
  4. (to be on the safe side) ENDDIRMAIL / STRDIRMAIL
SMTP server response after enabling TLS 1.2
2021.08.12 09:10:39 SND: STARTTLS                                                          
2021.08.12 09:10:39 RCV: 220 Ready to start TLS                                            
2021.08.12 09:10:39 SND: EHLO MYIBM.ACME.DE                                         
2021.08.12 09:10:39 RCV: 250-smtp.strato.de greets 54.146.22.31                             


Further information

In this case, steps 1) and 2) of the instructions were sufficient. In the next steps we will work with the Digital Certificate Manager (DCM). With this customer, we did not have access to DCM. But the required steps had obviously been done before.

Steps 3) to 10) may also be required for other customers. In addition the note to step 3): the call of the DCM and also how to solve problems with the call is described on the page IBM i - wichtige Informationen rund um das Betriebssytem im Abschnitt Digital Certificate Manager(DCM)

The detailed description of how to enable TLS 1.2 on IBM i V7R1M0 can be found at TLS1.2 unter IBMi V7R1 aktivieren can be found.

2021-08-12Version 5.50.05 and higherAuthor RSC

Problems with ePost (and possibly other providers) when outputting PDF documents

The service provider ePost has launched a new release on 2021-10-29. This release requires the Courier New font.

Our customers generally use "*COURIER" as font in their ATMDEF and CVTSPLF, which causes all documents to be rejected.

A quick remedy is to copy the file Courier New in the directory %WINDIR%\Fonts to the IFS directory /Toolmaker/Directmail400/fonts on a PC.


This copies 4 files

  • COUR.ttf

  • COURBD.ttf

  • COURBI.TTF

  • COURI.TTF

From these we need only the COUR.ttf.

The other 3 can be deleted immediately.

Correction of the automail definitions

Now you can specify "COUR.TTF" as font in your ATMDEFs and CVTSPLF.

F9-FP


Correction in CVTSPLF command

If the CVTSPLF command is used, the FONT(COUR.TTF) parameter must be set:

Note licensing!

Note licensing of COUR.TTF

This procedure provides a short-term remedy and can serve as a temporary workaround.

However, it must be noted that a license must be purchased from Microsoft in order to use the font file on a server.

For more information on how to purchase a license for the Courer New font, please visit this website: https://www.fonts.com/content/microsoft-typography


2021-11-19Directspool, CVTxxx - all versionsAuthor RSC

PDF/A - Form is ignored (22000003)

There are different "versions" of PDF/A files. Directmail supports conversion from IBM SPLF to PDF/A of the following versions:

  • Version 1.4, PDF/A-1a
  • Version 1.4 PDF/A-1b
  • ZUGFERD

The version of a PDF/A file can be identified in the document properties of the PDF file:


In this conversion it is possible to specify a PDF file as a "form". A form is a PDF file located in the "/Forms" directory of directspool in the IBM i's IFS.

If a form is specified (in the WRTEMLAPI command with the OVERLAY() parameter or in a directspool (automail) definition in the "F9-FP" menu), then the contents of this PDF file will be added to the contents of the SPLF.

In the selection "Create PDF/A" or in the WRTEMPLAPI in the parameter PDFA() it can be specified that the result file should be PDF/A. It must be specified whether it should be PDF/A-1a(*V1A2005) or PDF/A-1b(*V1B2005).

If a form is to be used and Create PDF/A says something other than *NO, then the version of the form PDF file must match the version of the PDF/A file to be created.


Furthermore, there seem to be compatibility issues related to the software used to create the form PDF file.

  • In this case the form PDF file had been created with the software "iLovePDF" - Adobe InDesign 16.1 (Macintosh) and could not be processed by directspool, although it had the correct version 1.4, PDF/A-1b:


  • After the customer re-created it using "Adobe inDesign 17.1 (Windows)" - Adboe PDF Library 16.0.5, it could be processed:


Summary/Checklist:

If a form is not deposited, check:

  1. do the version of the form PDF file and the specification in "Create PDF/A" match?
    1. PDF/A-1a ↔ *V1A2005
    2. PDF/A-1b ↔ *V1B2005
  2. Was the form PDF file created with a compatible program?


2022-03-14Directspool, EML-API - all versionsAuthor RSC