Article Index
Nathan M. Andelin   March 2017

Sending Email from IBM i Applications

Email certainly is a ubiquitous and essential service. However, what began as a Simple Mail Transport Protocol (SMTP), has evolved into a complex and tricky subject.

IBM i includes a number of servers which implement SMTP standards, including an SMTP client for sending email from IBM i applications, an SMTP server for receiving email and storing it in the IFS, an SMTP bridge, and a number of prestart jobs that handle individual requests.

IBM i SMTP services (client, server, bridge, and prestart jobs) are started via the STRTCPSVR *SMTP command, and ended via the ENDTCPSVR *SMTP command. They can also be configured to start and end automatically when TCP/IP services are started and ended.

This article shares tips and techniques for using the IBM i SMTP Client for sending email from IBM i applications.

Multipurpose Internet Mail Extension (MIME)

While IBM i TCP/IP servers handle the communication aspects of sending and receiving email in accordance with SMTP standards, a built-in set of commands and programming interfaces may be used to generate, appropriately format, and request transfer of messages and attachments to designated recipients.

Commands include:

  • SNDDST - Send Distribution.
  • SNDSMTPEMM - Send SMTP E-Mail.

Programming APIs include:

  • QtmsCreateSendEmail() - Create and Send MIME E-Mail.
  • QtmmSendMail() - Send MIME Mail.
  • sendMail() - Net.Data Send Mail.

A number of interfaces provided by 3rd party's wrap built-in interfaces, while others may be completely proprietary.

Of the ones listed above, my favorite is the Net.Data sendMail() interface, which may be a topic for a different article. The key point is that these interfaces generate formatted messages which may include attachments that comply with MIME standards.

Scope

Some of the reasons that email has become complex and tricky include:

  • Email is an essential element of applications and application suites which include robust and complex functionality.
  • Email applications and tools represent a large, complex, and highly-competitive market which includes posturing among high-profile service providers such as Google, Microsoft, Yahoo, IBM, Barracuda, Message Labs in addition to a host of vendors in the IBM i space.
  • Security requirements pertaining to email have become complex.

Email has perhaps become the most popular vehicle for:

  • Cajoling and enticing consumers (i.e. spamming).
  • Transporting and loading malware (i.e. viruses and trojan horses).
  • Hacking into systems.
  • Scamming and gathering personal information via manipulative tricks (i.e. phishing).

While mindful of the foregoing, I intend on limiting the scope of this article to using the IBM i SMTP Client and commands for sending email from the IBM i command line and from IBM i applications.

Four Ways of Sending Email

The IBM i SMTP Client offers at least 4 methods for sending email, including:

  1. Sending directly to any email server on the planet that has a DNS MX record defined for a service on port 25, which essentially means sending to anyone who has an email account anywhere.
  2. Forwarding mail to a mail-hub host, using credentials (account and password) that are authenticated by the host. The mail-hub then sends to the final destination point, using the sender's account which was provided by the IBM i SMTP Client. This mimics the functionality of PC-based email client and comparable personal devices.
  3. Forwarding mail to a relay-hub, that may or may not require credentials (relay hubs are generally configured to accept relay from specific IP addresses rather than credentialed persons). Relay hubs may offer quite a few options for handling email.
  4. Forwarding mail to users on remote IBM i systems, using IBM i distribution services.

Option 1 is the easiest to configure and the most direct. It is arguably most appropriate for sending email from "applications" as opposed to sending from "persons".

Option 2 is promoted by some vendors in the IBM i space, however mimicking the behavior of PC email clients seems somewhat incongruent with the nature of application servers, to me.

Option 3 appeals to IBM i shops that utilize email services hosted on other platforms, including cloud-service platforms which is a growing trend. Services may include filtering outbound mail for viruses, logging mail in "sent" folders, long-term storage, and integration with application suites.

Option 4 may appeal for special (i.e. super-secret, inter-company, private-network) communications.

I should note that the IBM i SMTP Server can also be configured to act as a mail or relay hub for external (remote) devices such as PC's, tablets, smart phones, printers, and scanners (that offer email capability).

First Steps

This article assumes that you already have:

  1. TCP/IP configured and running on IBM i.
  2. A publicly registered domain name (i.e. example.com), that has a DNS MX entry, pointing to a public IP address pertaining to an internal router/firewall that forwards port 25 (SMTP) to your IBM i server.

Ensure that you have IBM i TCP/IP "host" and "domain" names configured. The domain name should match that which is configured publicly (i.e. example.com).

In the following example, email would originate from a server named apps.example.com, which is a global setting.


                       Change TCP/IP Domain (CHGTCPDMN)                        
                                                                               
Type choices, press Enter.                                                     
                                                                               
Host name  . . . . . . . . . . .   'apps'                                      
                                                                               
Domain name  . . . . . . . . . .   'example.com'                               
                                                                               
                                                                               
                                                                               
Domain search list . . . . . . .   *DFT                                        
                                                                               
                                                                               
                                                                               
Host name search priority  . . .   *LOCAL        *REMOTE, *LOCAL, *SAME        
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                       More... 
F3=Exit   F4=Prompt   F5=Refresh   F10=Additional parameters   F12=Cancel      
F13=How to use this display        F24=More keys                               

User Profile

You should configure at least one IBM i User Profile, which may represent an "application" or "person" from which, or from whom email is sent.

The following example shows a user profile that represents an application. It's authority is limited, and can't "sign on".


                         Display User Profile - Basic            
                                                                 
User profile . . . . . . . . . . . . . . . :   ONEPOINT          
                                                                 
Previous sign-on . . . . . . . . . . . . . :                     
Password verifications not valid . . . . . :   0                 
Status . . . . . . . . . . . . . . . . . . :   *ENABLED          
Date password last changed . . . . . . . . :   02/21/17  11:34:59
Password is *NONE  . . . . . . . . . . . . :   *YES              
Password expiration interval . . . . . . . :   *NOMAX            
Password set expired by command  . . . . . :   *NO               
Block password change  . . . . . . . . . . :   *SYSVAL           
Local password management  . . . . . . . . :   *YES              
User class . . . . . . . . . . . . . . . . :   *USER             
Creation date/time . . . . . . . . . . . . :   02/21/17  11:34:59
Change date/time . . . . . . . . . . . . . :   02/21/17  12:34:37
Last used date . . . . . . . . . . . . . . :                     
Restore date/time  . . . . . . . . . . . . :                     
User expiration date . . . . . . . . . . . :   *NONE             
User expiration interval . . . . . . . . . :   *NONE   
User expiration action . . . . . . . . . . :   *NONE   
Special authority  . . . . . . . . . . . . :   *NONE   
Group profile  . . . . . . . . . . . . . . :   *NONE   
Owner  . . . . . . . . . . . . . . . . . . :   *USRPRF 
Group authority  . . . . . . . . . . . . . :   *NONE   
Group authority type . . . . . . . . . . . :   *PRIVATE
Supplemental groups  . . . . . . . . . . . :   *NONE   
Assistance level . . . . . . . . . . . . . :   *SYSVAL 
Current library  . . . . . . . . . . . . . :   *CRTDFT 
Initial program  . . . . . . . . . . . . . :   *NONE   
  Library  . . . . . . . . . . . . . . . . :           
Initial menu . . . . . . . . . . . . . . . :   *SIGNOFF
  Library  . . . . . . . . . . . . . . . . :           
Limit capabilities . . . . . . . . . . . . :   *NO     
                                                       
Press Enter to continue.                               
                                                       
F3=Exit   F12=Cancel                                   


A Directory Entry should be added for that user (i.e. WRKDIRE Command)


                       Display Directory Entry Details
                                                      
User ID/Address . . . . :   ONEPOINT  S06A789R        
Description . . . . . . :   Onepoint Portal           
System name/Group . . . :   S06A789R                  
User profile  . . . . . :   ONEPOINT                  
Network user ID . . . . :   ONEPOINT S06A789R         
                                                      
Name:                                                 
  Last  . . . . . . . . :                             
  First . . . . . . . . :                             
  Middle  . . . . . . . :                             
  Preferred . . . . . . :                             
  Full  . . . . . . . . :                             
                                                      
Department  . . . . . . :                             
Job title . . . . . . . :                             
Company . . . . . . . . :                             
Telephone numbers . . . :    
                             
                             
FAX telephone number  . :    
                             
Location  . . . . . . . :    
Building  . . . . . . . :    
Office  . . . . . . . . :    
                             
Mailing address . . . . :    
                             
                             
Locally-defined . . . . :   Yes                   
                                                  
Indirect user . . . . . :   No                    
Print cover page  . . . :   Yes                   
Mail notification . . . :   Specific types of mail
  Priority, private,                              
    important mail  . . :   Yes                   
  Messages  . . . . . . :   Yes                   
                                                  
Text  . . . . . . . . . :                         
                                                  
Mail service level  . . :   System message store  
                                                  
Preferred address . . . :   SMTP name             
  Address type  . . . . :                         
                             
                             
Forward from user identifier:
  User ID/Address . . . :    


Configure a directory entry as an SMTP Gateway. My understanding is that this enables email distributions to addresses that are not in the WRKDIRE list.

ADDDIRE USRID(SMTP GATEWAY) USRD('SMTP Gateway') USER(QUSER)

CHGDSTA KEEPRCP(*ALL) SMTPRTE(SMTP GATEWAY)

Lastly, a SMTP Name should be added for that user (i.e. WRKNAMSMTP Command). As shown below, the email account would be onepoint@example.com


                            Display Name for SMTP                             
                                                            System:   S06A789R
User ID/Address . . . . . :   ONEPOINT S06A789R                               
                                                                              
                                                                              
SMTP user ID  . . . . . . :   onepoint                                        
SMTP domain . . . . . . . :   EXAMPLE.COM                                      
                                                                              
                                                                              
                                                                              
                                                                              
SMTP route  . . . . . . . :                                                   
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
Press Enter to continue.                                                      
                                                                              
F3=Exit   F12=Cancel                                                          
                                                                              

Public DNS Records

Some developers who were sending email using Option 1 (sending directly to final end-points from IBM i applications) have had problems with messages getting blocked or placed in spam folders. This may have led to distrust in the IBM i SMTP Client as the problems may have disappeared after switching to a mail-relay service.

This misunderstanding is unfortunate because it is likely that the problems had nothing to do with IBM i interfaces.

The primary reason for recipients automatically blocking or placing messages in spam folders is due to the domain name referenced in the sender's email address not matching the domain name from which the message originated.

If the public IP address that maps to your IBM i server pertains to the domain example.com, then the sender's email address contained in the message should reference an account such as onepoint@example.com, when sending directly to recipients; otherwise, the recipient's email server may assume that the sender's account was maliciously spoofed.

The next largest reason for some recipient-servers placing messages in spam folders is the absence of DNS "spf" and "dmarc" records. Adding appropriate public "spf" and "dmarc" records for your IBM i domain will likely fix the problem of legitimate mail being placed in spam folders.

If your message "content" is flagged as spam by your recipients or their service providers, that's a different problem, which won't be solved by switching to a relay-service. I quoted the word "content" to suggest that it may sound a lot like spam.

SPF Records

SPF records are a type of Domain Name Service (DNS) record that identifies which mail servers are permitted to send email on behalf of your domain. SPF is an acronym for Sender Policy Framework, which is a specification intended to reduce outgoing spam.

It may be best for you or your domain administrator to do independent research on how to appropriately format SPF records for your domain. DNS TXT records are used to define SPF values.

Google's recommendations regarding SPF

Values such as "v=spf1 a:example.com -all", would be interpreted as passing (as opposed to failing) senders from example.com, and failing all others.

DMARC Records

Like SPF, DMARC is a framework intended to reduce outgoing spam. DNS TXT records are used to specify policies of sending domains. Again, independent research on DMARC would be helpful.

A value such as "v=DMARC1; p=none; sp=none; fo=; ri=3600; rua=mailto:onepoint@example.com" means:

  • policy=none.
  • policy for sub domains = none.
  • mail reports (i.e. problems) to onepoint@example.com
Google's recommendations regarding DMARC

In my experience, the most relevant point of DMARC is the ability for receiving domains to report problems to a sending domain's administrator. You should specify a valid IBM i email account.

MX Toolbox

A handy site for checking the status of your site's DNS, MX, SPF, DMARC, and other records is www.mxtoolbox.com



The tools also make recommendations for fixing DNS problems.

IBM i SMTP Attributes

This article shows the IBM i command-line interface for configuring SMTP attributes as opposed to the GUI navigator interface. Both interfaces are a bit tricky and somewhat confusing in my opinion:

  • It's not clear which attribute settings pertain to the SMTP Client, the SMTP Server, the SMTP Bridge, SMTP Prestart Jobs, or some combination of the above.
  • The labels and help text include words and terms that may be unfamiliar to email administrators, and send mixed signals.
  • The difference between mail-router and forwarding-mail-hub isn't clear.

On a positive note, my experience suggests that you won't need to vary much from default attribute settings. Consider the following:


                       Change SMTP Attributes (CHGSMTPA)                     
                                                                             
Type choices, press Enter.                                                   
                                                                             
Autostart server . . . . . . . .   *YES          *SAME, *YES, *NO            
Retries by minute:                                                           
  Number of retries  . . . . . .   3             0-99, *SAME, *DFT           
  Time interval  . . . . . . . .   1             0-99, *SAME, *DFT           
Retries by day:                                                              
  Number of retries  . . . . . .   0             0-9, *SAME, *DFT            
  Time interval  . . . . . . . .   0             0-9, *SAME, *DFT            
Retries by hour:                                                             
  Number of retries  . . . . . .   0             0-99, *SAME, *DFT           
  Time interval  . . . . . . . .   0             0-99, *SAME, *DFT           
Retry remote name server . . . .   *NO           *SAME, *YES, *NO            
Automatic registration . . . . .   *NO           *SAME, *NO, *YES            
  User ID prefix . . . . . . . .   QSM           Name, *SAME, *DFT           
  Address  . . . . . . . . . . .   QSMRMTAD      Name, *SAME, *DFT           
  System name  . . . . . . . . .   TCPIP         Character value, *SAME, *DFT
  Alias table type . . . . . . .   *SYSTEM       *SAME, *SYSTEM, *PERSONAL   
User ID delimiter  . . . . . . .   '?'           *SAME, *DFT, ?, =, ., &, $...
Mail router  . . . . . . . . . .   *NONE                                      
                                                                              
                                                                              
                                                                              
Coded character set identifier     00819         1-65533, *SAME, *DFT         
Outgoing EBCDIC/ASCII table:                                                  
  Outgoing EBCDIC/ASCII table  .   *CCSID        Name, *SAME, *CCSID, *DFT    
    Library  . . . . . . . . . .                 Name, *LIBL, *CURLIB         
Incoming ASCII/EBCDIC table:                                                  
  Incoming ASCII/EBCDIC table  .   *CCSID        Name, *SAME, *CCSID, *DFT    
    Library  . . . . . . . . . .                 Name, *LIBL, *CURLIB         
Firewall . . . . . . . . . . . .   *NO           *SAME, *YES, *NO             
Journal  . . . . . . . . . . . .   *NO           *SAME, *YES, *NO             
Process all mail through MSF . .   *NO           *SAME, *YES, *NO             
Percent routing character  . . .   *YES          *SAME, *YES, *NO             
Dial-up scheduler:                                                           
  Start with SMTP server . . . .   *NO           *NO, *SAME, *YES            
  Configuration profile  . . . .                 Name, *SAME                 
  Connection time interval . . .                 1-1440 minutes, *SAME, *NONE
Support ETRN for server  . . . .   *NO           *SAME, *NO, *YES            
Support ETRN for client:                                                     
  Enable client ETRN . . . . . .   *NO           *NO, *SAME, *YES            
  Incoming mail server address                                               
                                                                             
  Mail domain name . . . . . . .                                             
                                                                             
                                                                             
                                                                             
Support 8-bit MIME . . . . . . .   *NO           *SAME, *NO, *YES            
Delivery status notification:                                                 
  Responsible person . . . . . .   *NONE                                      
                                                                              
                                                                              
                                                                              
Subsystem description  . . . . .   QSYSWRK       Name, *SAME, *DFT            
  Library  . . . . . . . . . . .     QSYS        Name                         
Realtime Blackhole List  . . . .   *NONE                                      
                                                                              
                                                                              
                                                                              
Allow relayed mail . . . . . . .   *LIST         *SAME, *NONE, *ALL, *BOTH... 
               + for more values                                              
POP send mail window . . . . . .   *NONE         15-65535 minutes, *NONE      
Interface/domain association . .   *NONE         *SAME, *NONE, *LIST          
Filter mail for virus  . . . . .   *NONE         *SAME, *NONE, *KEEP, *DISCARD
Override reject connect list . .   *NO           *SAME, *NO, *YES             
Allow bare line feed . . . . . .   *YES          *SAME, *NO, *YES             
Verify identification  . . . . .   *NO           *SAME, *NO, *YES             
Allow authentication . . . . . .   *NONE         *SAME, *RELAY, *LCLRLY, *NONE
Verify MSF messages  . . . . . .   *NO           *SAME, *YES, *NO             
Verify from user . . . . . . . .   *ALL          *SAME, *ALL, *LIST, *NONE    
Forwarding mailhub server  . . .                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                        Bottom
F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display   
F24=More keys                                                                 

I believe the configuration above shows defaults except for "Allow relayed mail", which I believe defaults to *NONE. Default settings enable the IBM i SMTP Client to send email directly to any recipient, worldwide.

The "Allow relayed mail" setting pertains to using your IBM i SMTP Server to relay email from external clients as opposed to relaying email from the IBM i SMTP Client to an external relay-hub (i.e. Google's mail-relay service), which will be delineated later.

Avoid allowing relay *ALL; You'd be surprised how quickly that hackers and spammers would find your server, begin using it (actually thrashing it) as an open-relay, your domain name would be black-listed, etc.

Allowing Relay from Approved Devices

Say you have a client or device such as a network printer/scanner that offers email capability. You can configure your IBM i SMTP Server to accept email from it, and deliver it to recipients.

The way to allow email relay from external clients and devices is to specify *LIST for the "Allow relayed mail" attribute, and use the ADDSMTPLE Command to add the IP address of the client or device, which you approve:


                        Add SMTP List Entry (ADDSMTPLE)                       
                                                                              
Type choices, press Enter.                                                    
                                                                              
List type  . . . . . . . . . . . > *ACCEPT       *ACCEPT, *REJECT, *NEAR...   
Internet address . . . . . . . .                                              
Subnet mask  . . . . . . . . . .   '255.255.255.255'                          
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                        Bottom
F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display   
F24=More keys                                                                 

You can also remove IP addresses from the *ACCEPT list via the RMVSMTPLE command:


                      Remove SMTP List Entry (RMVSMTPLE)                      
                                                                              
Type choices, press Enter.                                                    
                                                                              
List type  . . . . . . . . . . . > *ACCEPT       *ACCEPT, *REJECT, *NEAR...   
Internet address . . . . . . . .                                              
Subnet mask  . . . . . . . . . .   '255.255.255.255'                          
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                        Bottom
F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display   
F24=More keys                                                                 

Forwarding Email to External Hubs or Relays

Just as the IBM i SMTP Server can be configured to accept email from external clients and devices, the IBM i SMTP Client can be configured to forward mail to external mail-hub or relay servers (i.e. MS Exchange, MS Office 365, Google G Suite).

The first (and possibly only) requirement on the IBM i side, would be to specify the domain name of the external mail-hub in the FWDHUBSVR attribute of the CHGSMTPA Command:


                       Change SMTP Attributes (CHGSMTPA)                      
                                                                              
Type choices, press Enter.                                                    
                                                                              
Override reject connect list . . OVRRJTCNNL     *NO                           
Allow bare line feed . . . . . . ALWBARELF      *YES                          
Verify identification  . . . . . VFYID          *NO                           
Allow authentication . . . . . . ALWAUTH        *NONE                         
Verify MSF messages  . . . . . . VFYMSFMSG      *NO                           
Verify from user . . . . . . . . VFYFROMUSR     *ALL                          
Forwarding mailhub server  . . . FWDHUBSVR      'smtp-relay.gmail.com'        
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                        Bottom
F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display   
F24=More keys                                                                 

In the example above, the IBM i SMTP Client would not deliver email directly to recipients, but rather would forward mail through a relay service provided by Google.

Of course, unless the forwarded hub allows open relay (not likely), you'll also be required to configure that server to accept email from your IBM i SMTP Client.

To illustrate, the following hyperlink delineates three (3) options for sending or forwarding email to Google SMTP servers, which correspond with 3 of the 4 options available under the IBM i SMTP Client, which I delineated at the beginning of this article:

G Suite SMTP settings to send mail from a printer, scanner, or app

The options are identified as follows:

  1. G Suite SMTP relay; running at smtp-relay.gmail.com; port 25, 465, or 587; SSL/TLS optional; authorized by sender's IP address.
  2. Gmail SMTP server; running at smtp.gmail.com; Port 465 (SSL), or 587 (TLS); authorized by senders GMAIL-G Suite credentials.
  3. Restricted Gmail SMTP server; running at aspmx.l.google.com; port 25; email must be addressed to valid GMAIL recipients.

Option 3 would be the one that the IBM i SMTP Client would use when configured to send email directly to recipients (i.e. Gmail accounts in this example), in accordance with the public MX records for the google.com domain name.

Under Option 2, the IBM i SMTP Client would need to be configured to mimic the behavior of a credentialed Gmail client (i.e. john@gmail.com). I'll delineate the configuration steps later.

Under Option 1, the FWDHUBSVR attribute of the CHGSMTPA Command needs to be set to point to smtp-relay.gmail.com, and your public IP address for your IBM i SMTP Client would need to be added to the relay-settings for your Gmail domain, which is similar to using the IBM i ADDSMTPLE TYPE(*ACCEPT) Command, to accept email from external clients and devices. Let's briefly review that next.

G Suite Administrative Console

This section is intended to briefly illustrate the type of configuration settings that you might need in order to relay mail through external servers provided by 3rd parties (i.e. MS Exchange, Google G Suite, MS Office 365, Message Labs, etc.).

You'll need credentials. After login, G Suite Administrators can navigate as follows:

Google Apps ==> Admin Console ==> Apps ==> G Suite (Gmail, Calendar, Drive, ...) ==> Gmail ==> Advanced Settings ==> SMTP Relay Service ==> Add.

This shows a panel in which you can allow email relayed from the public IP address pertaining to your IBM i server.



Note that TLS encryption and SMTP authentication are optional. If you choose to require TLS encryption and SMTP authentication, that will require additional configuration on your IBM i, which will be delineated next.

Sideline Points

Before getting into the configuration requirements for TLS encryption, I'd like to make a couple sideline points.

In this article I've implied a few distinctions between sending email from IBM i applications vs. managing email within office suites that include robust personal email options.

IBM i applications may not require email-relay, user authentication, or encryption (i.e. notices, alerts, password-reset options, non-sensitive attachments, etc.). You may not want to provide reply options to recipients. In such instances, it makes sense that the sender's address refers to a product or brand rather than a person.

In the event that you want to send from a product or application, but accept replies to a person, the best way to do that is via a MIME specification that distinguishes the sender's email address from the "reply to" address, which may refer to an account hosted on another platform (i.e. Yahoo, Gmail, etc.). This is a widely-accepted MIME standard.

Not all the IBM i command and programming interfaces accept "reply to" addresses that are different from the sender's address. But this feature is available in 3rd party options.

Retrieving Certificates via OpenSSL

The first step in configuring TLS encryption is to retrieve certificates from your relay host (i.e. smtp-relay.gmail.com). OpenSSL is often used for this.

OpenSSL can be invoked from a PASE QP2SHELL session (Enter qp2shell on a command line), or it can be downloaded to your PC from internet sources.

For example, invoke the OpenSSL "s_client" command to show a list of Gmail certificates and view the results as follows:

s_client -connect smtp-relay.gmail.com:587 -starttls smtp -showcerts

The syntax above assumes that you're using OpenSSL on your PC. When using QP2SHELL, preface the s_client command with the openssl command (i.e. openssl s_client ...).


...
-----BEGIN CERTIFICATE-----
MIIEjDCCA3SgAwIBAgIIaahJvqvKhbUwDQYJKoZIhvcNAQELBQAwSTELMAkGA1UE
BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl
cm5ldCBBdXRob3JpdHkgRzIwHhcNMTcwMjIyMDkwNDU5WhcNMTcwNTE3MDg1NzAw
WjBuMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN
TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEdMBsGA1UEAwwUc210
cC1yZWxheS5nbWFpbC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQCb+IaPsMW1BN6sTycs0QBhVgz7A6FzALSECBuPvDrfR8omdmkQ2gAzcLQhiP44
hmIwa5D1e+hq5qcFEcY5d2Xy6dVUSJ4lKgvA7nIenBT2C3nxIOq8zNboRgIevfdy
pTJmrFvEiSo6uK7sCzkreYqW+HwM95EpqBE4Un56LvoJQgbvrZlhlNP2E+8ozXuc
lsPkd1HOLM9YmrA/RQ7C5xWIuOp6c7w2LjJdIfeJs0LZ1Sl2as+0YBn+D/x76IeX
jdrd+TZViMa9iIsa/glYSXQi9PZgqz80g/rNp234uBTQPe6BNSs+5at1aV8B6r0I
Th2SAS20a6CcSzq1nLlZR1t3AgMBAAGjggFRMIIBTTAdBgNVHSUEFjAUBggrBgEF
BQcDAQYIKwYBBQUHAwIwHwYDVR0RBBgwFoIUc210cC1yZWxheS5nbWFpbC5jb20w
aAYIKwYBBQUHAQEEXDBaMCsGCCsGAQUFBzAChh9odHRwOi8vcGtpLmdvb2dsZS5j
b20vR0lBRzIuY3J0MCsGCCsGAQUFBzABhh9odHRwOi8vY2xpZW50czEuZ29vZ2xl
LmNvbS9vY3NwMB0GA1UdDgQWBBT8UUaY9RgyzrPmhawmRJqV99mV5jAMBgNVHRMB
Af8EAjAAMB8GA1UdIwQYMBaAFErdBhYbvPZotXb1gba7Yhq6WoEvMCEGA1UdIAQa
MBgwDAYKKwYBBAHWeQIFATAIBgZngQwBAgIwMAYDVR0fBCkwJzAloCOgIYYfaHR0
cDovL3BraS5nb29nbGUuY29tL0dJQUcyLmNybDANBgkqhkiG9w0BAQsFAAOCAQEA
fLgRaixxxfo94Nf7+e7X288IfEkQCDs5IYKetN+BEFWg/RIRVafZtk0Tc52JQcT5
gZGXwnMm+JqUv8OZ8Phn/oJDzH33W4uTIsjJcYKHf9zdhBpeVV+ykag0K5cTyPmV
iryot8umQUlS9QpwPLRVbGUoYg4m+Rl6n6P9ljciynssmnT68hBXF/b7WfmoV6ZF
sem7b8HD1jvxyAdUxpxSU4+OlnO15QjCQlbBMfFwmpOjK4r2E/QPvoRmwx5gXBlz
T1SNo4Zy1OI8klHC14DGzQw+Vy+IDyKBYGPnM7zY9JZra1v3m/MJoQBIcv5qZD9q
ep46ZbwjMUM8HzE3UmKtxw==
-----END CERTIFICATE-----
 1 s:/C=US/O=Google Inc/CN=Google Internet Authority G2
   i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
-----BEGIN CERTIFICATE-----
MIID8DCCAtigAwIBAgIDAjqSMA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMTUwNDAxMDAwMDAwWhcNMTcxMjMxMjM1OTU5WjBJMQswCQYDVQQG
EwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzElMCMGA1UEAxMcR29vZ2xlIEludGVy
bmV0IEF1dGhvcml0eSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AJwqBHdc2FCROgajguDYUEi8iT/xGXAaiEZ+4I/F8YnOIe5a/mENtzJEiaB0C1NP
VaTOgmKV7utZX8bhBYASxF6UP7xbSDj0U/ck5vuR6RXEz/RTDfRK/J9U3n2+oGtv
h8DQUB8oMANA2ghzUWx//zo8pzcGjr1LEQTrfSTe5vn8MXH7lNVg8y5Kr0LSy+rE
ahqyzFPdFUuLH8gZYR/Nnag+YyuENWllhMgZxUYi+FOVvuOAShDGKuy6lyARxzmZ
EASg8GF6lSWMTlJ14rbtCMoU/M4iarNOz0YDl5cDfsCx3nuvRTPPuj5xt970JSXC
DTWJnZ37DhF5iR43xa+OcmkCAwEAAaOB5zCB5DAfBgNVHSMEGDAWgBTAephojYn7
qwVkDBF9qn1luMrMTjAdBgNVHQ4EFgQUSt0GFhu89mi1dvWBtrtiGrpagS8wDgYD
VR0PAQH/BAQDAgEGMC4GCCsGAQUFBwEBBCIwIDAeBggrBgEFBQcwAYYSaHR0cDov
L2cuc3ltY2QuY29tMBIGA1UdEwEB/wQIMAYBAf8CAQAwNQYDVR0fBC4wLDAqoCig
JoYkaHR0cDovL2cuc3ltY2IuY29tL2NybHMvZ3RnbG9iYWwuY3JsMBcGA1UdIAQQ
MA4wDAYKKwYBBAHWeQIFATANBgkqhkiG9w0BAQsFAAOCAQEACE4Ep4B/EBZDXgKt
10KA9LCO0q6z6xF9kIQYfeeQFftJf6iZBZG7esnWPDcYCZq2x5IgBzUzCeQoY3IN
tOAynIeYxBt2iWfBUFiwE6oTGhsypb7qEZVMSGNJ6ZldIDfM/ippURaVS6neSYLA
EHD0LPPsvCQk0E6spdleHm2SwaesSDWB+eXknGVpzYekQVA/LlelkVESWA6MCaGs
eqQSpSfzmhCXfVUDBvdmWF9fZOGrXW2lOUh1mEwpWjqN0yvKnFUEv/TmFNWArCbt
F4mmk2xcpMy48GaOZON9muIAs0nH5Aqq3VuDx3CQRk6+0NtZlmwu9RY23nHMAcIS
wSHGFg==
-----END CERTIFICATE-----
 2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
   i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
-----BEGIN CERTIFICATE-----
MIIDfTCCAuagAwIBAgIDErvmMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT
MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0
aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDIwNTIxMDQwMDAwWhcNMTgwODIxMDQwMDAw
WjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UE
AxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9m
OSm9BXiLnTjoBbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIu
T8rxh0PBFpVXLVDviS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6c
JmTM386DGXHKTubU1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmR
Cw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5asz
PeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo4HwMIHtMB8GA1UdIwQYMBaAFEjm
aPkr0rKV10fYIyAQTzOYkJ/UMB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrM
TjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjA6BgNVHR8EMzAxMC+g
LaArhilodHRwOi8vY3JsLmdlb3RydXN0LmNvbS9jcmxzL3NlY3VyZWNhLmNybDBO
BgNVHSAERzBFMEMGBFUdIAAwOzA5BggrBgEFBQcCARYtaHR0cHM6Ly93d3cuZ2Vv
dHJ1c3QuY29tL3Jlc291cmNlcy9yZXBvc2l0b3J5MA0GCSqGSIb3DQEBBQUAA4GB
AHbhEm5OSxYShjAGsoEIz/AIx8dxfmbuwu3UOx//8PDITtZDOLC5MH0Y0FWDomrL
NhGc6Ehmo21/uBPUR/6LWlxz/K7ZGzIZOKuXNBSqltLroxwUCEm2u+WR74M26x1W
b8ravHNjkOR/ez4iyz0H7V84dJzjA1BOoa+Y7mHyhD8S
-----END CERTIFICATE-----
---
Server certificate
subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp-relay.gmail.com

issuer=/C=US/O=Google Inc/CN=Google Internet Authority G2
---
...

That OpenSSL command (s_client) extracts three (3) certificates from the domain (smtp-relay.gmail.com:587), named as follows:

  1. GeoTrust Global CA
  2. Google Internet Authority G2
  3. smtp-relay.gmail.com

The trio are part of hierarchical chain, including root, intermediate, and final certificates. You can cut and past the certificate contents, including the BEGIN and END lines, and save them into three (3) separate files, locally. Use FTP or some other interface to copy the files to the IFS, where they can be imported into the IBM i Digital Certificate Manager.

The hierarchy can be seen by importing them into your local PC certificate store (if interested).

IBM i Digital Certificate Manager

TLS encryption entails 2 parts. First, the IBM i SMTP Client must be configured to "trust" the certificates of your 3rd-party mail-relay provider. Second, the IBM i SMTP Client must be "assigned" a certificate, which may be generated locally by the DCM, or imported from a certificate authority; The easiest and least cost is to generate your own certificate.

OpenSSL outputs certificates in a format known as Base64-Encoding, which is the format required by the IBM i Digital Certificate Manager. Importing any other type of format into the IBM i DCM will cause TLS encryption to fail.

Access the IBM i DCM from your browser as follows:

http://[domain or IP address]:2001/QIBM/ICSS/Cert/Admin/qycucm1.ndm/main0

IBM i System Certificate Store

Each of the three (3) certificates retrieved from your mail-relay must be imported into the IBM i DCM, in the order of root, then intermediate, then final. After that, we can address how to "trust" them.

Use options to select the *System store:






If the *System store has not been configured yet, then see instructions in the following link.


How to Create the *SYSTEM Store in DCM


Import Certificate Authority Certificates

The following screen shows a list of Certificate Authority Certificates that have been imported into the *System store.



Click the <Import> button and follow the prompts to import the certificates that were extracted from your mail-relay provider.



Trusting Certificate Authority Certificates

The IBM i SMTP Client must be configured to "trust" the certificates provided and used by your mail-relay provider. Two (2) options are provided for configuring trust for the SMTP Client:

  1. Trust all CA certificates in the *System store.
  2. Configure a "trust list" of certificates provided by your mail-relay provider.

Select "Work with client applications" in "Fast Path" options. Select the "IBM i TCP/IP SMTP Client" radio button, and click the <Work With Application> button.


While working with SMTP Client configuration, the easiest option is to click the radio button labeled "No", for the "Define CA Trust List" parameter, shown as follows. The SMTP Client will trust all CA certificates in the *System store.



As an alternative, when the Define CA Trust List is set to "Yes", a button will appear after a screen refresh, which enables a "trust list" to be configured for the SMTP Client.

I won't lay out the steps for defining a CA Trust List; The DCM prompts are not hard to follow.


Assigning a Certificate to the SMTP Client

Included on the Work With Application screen is a button to <Update Certificate Assignment>



That option brings up a list of "server and client" certificates in the *System store. The list may include self-signed certificates you created via DCM. It may also include certificates issued from certificate authorities that you imported into the "server and client" section of the *System store.

See How To Create A Basic Self-Signed Certificate in DCM



Configuring Credentials for the IBM i SMTP Client

In the event that you choose to forward mail through a relay hub, and choose to require SMTP authentication or TLS encryption (which requires authentication), you can add credentials with the ADDSMTPLE Command as follows:


                        Add SMTP List Entry (ADDSMTPLE)                       
                                                                              
Type choices, press Enter.                                                    
                                                                              
List type  . . . . . . . . . . . > *HOSTAUTH     *ACCEPT, *REJECT, *NEAR...   
Host name  . . . . . . . . . . .   smtp-relay.gmail.com                       
                                                                              
                                                                              
                                                                              
User name  . . . . . . . . . . .   john                                       
                                                                              
                                                                              
User password  . . . . . . . . .   Jbtheway01                                 
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                        Bottom
F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display   
F24=More keys                                                                 

You can remove credentials and add them again (i.e. to implement password change) as follows:


                      Remove SMTP List Entry (RMVSMTPLE)                      
                                                                              
Type choices, press Enter.                                                    
                                                                              
List type  . . . . . . . . . . . > *HOSTAUTH     *ACCEPT, *REJECT, *NEAR...   
Host name  . . . . . . . . . . .   smtp-relay.gmail.com                       
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                        Bottom
F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display   
F24=More keys                                                                 

I believe that covers the configuration steps for sending email directly to recipients, or through a mail or relay hub, including the use of SMTP authentication and TLS encryption.

If your SMTP Client fails to deliver email from your IBM i, you may need to trace and debug communications.

Debugging Communications Problems

If your SMTP Client fails to deliver email from your IBM i, you may need to trace and debug communications. IBM i provides a command sequence for tracking communications and producing logs.

  1. ENDTCPSVR *SMTP - End SMTP Jobs.
  2. TRCTCPAPP APP(*SMTPCLT) TRCFULL(*STOPTRC) - Start SMTP Client Trace.
  3. STRTCPSVR *SMTP - Start SMTP Jobs.
  4. SNDDST (or other command to send email).
  5. TRCTCPAPP APP(*SMTPCLT) SET(*OFF) TITLE('Outbound E-mail') - Generate Spool File Logs of Trace.

I simplified the sequence by placing the commands in a CLLE program, and invoking it from a custom command.

Communications logs are interesting reading in that they show a conversation, which includes error messages. The following is a conversation between an IBM i SMTP client and smtp-relay.gmail.com, which includes transport layer security (TLS).

5770TC1V7R1M0100416                                                  RADILE
Application..................SMTP Client Pre Start Job
Buffer size (KB).............4096
Trace full action............*STOPTRC
Filter....................... None
Job id.......................385239/QTCP      /QTSMTPCLTP
  Start time...................Mon Mar 20 2017 01:10:14 UTC
End time.....................Mon Mar 20 2017 01:10:47 UTC
Trace full...................No
  Configuration Changed........No
SMTP CONFIGURATION PARAMETERS
IPV6 Capable.....................................: *YES
FIRST LEVEL RETRY INTERVAL (MINUTES) ............: 1
FIRST LEVEL RETRY ATTEMPTS(0-99).................: 3
SECOND LEVEL RETRY INTERVAL (HOURS)..............: 0
SECOND LEVEL RETRY ATTEMPTS(0-99)................: 0
RETRY REMOTE NAME SERVER (Y/N)...................: N
AUTOSTART SMTP (Y/N).............................: Y
INBOUND XLATE TABLE (Y/N)........................: N
OUTBOUND XLATE TABLE (Y/N).......................: N
CFG CCSID........................................: 819
HOST NAME (CP 500)...............................: radile
HOST DOMAIN NAME (CP 500)........................: radile.com
MAIL ROUTER (CP 500).............................:
INBOUND XLATE TABLE..............................:
OUTBOUND XLATE TABLE.............................:
CONFIGURED DELIMITER CHAR........................: ?
FIREWALL (Y/N)...................................: N
PROCESS ALL MAIL (Y/N)...........................: N
PERCENT ROUTE CHARACTER (Y/N) ...................: Y
ETRN SERVER ENABLED (Y/N) .......................: N
ETRN CLIENT ENABLED (Y/N) .......................: N
  ETRN CLIENT IPADDR ............................:
  ETRN CLIENT HOST/DOMAIN .......................:
8BITMIME (Y/N)...................................: N
DSN (Y/N) .......................................: N
  DSN RESPONSIBLE PERSON ........................: *NONE
SUBSYSTEM LIBRARY ...............................: QSYS
          NAME ..................................: QSYSWRK
RBL SITE ADDRESS.................................: *NONE
ALLOW RELAY......................................: *LIST
POP BEFORE MAIL WINDOW...........................: 0
FILTER ACTION....................................: *NONE
INTERFACE DOMAIN.................................: *NONE
AUTOREGISTRATION (Y/N)...........................: N
JOURNAL..........................................: *NO
Override reject connect list (Y/N)...............: N
Allow bare line feed (Y/N).......................: Y
Verify Id (Y/N)..................................: N
Verify MSF Message (Y/N).........................: N
Allow authentication.............................: *NONE
Verify from user.................................: *ALL
Forwarding mailhub domain server.................: smtp-relay.gmail.com
   DATE     TIME(UTC)   J   MODULE   STMT  TEXT
---------- ------------ - ---------- ----- -----------------------------------------------------------------------------
03/20/2017 01:10:14.423 5 qtmsclcp.C 00854 *************  CLCP EYE-CATCHER  *****************
03/20/2017 01:10:14.530 5 qtmsclcp.C 00855 Client Control Program Started
03/20/2017 01:10:14.530 5 qtmsclcp.C 00580 >>TOP<< of the CLCP loop
03/20/2017 01:10:14.530 5 qtmsclcp.C 00584 Waiting for work
03/20/2017 01:10:37.913 5 qtmsclcp.C 00586 Got work
03/20/2017 01:10:37.915 5 qtmsclcp.C 00588 Config reprocessed
03/20/2017 01:10:37.915 5 qtmsclcp.C 00591 Got piece of work (MCB) from daemon
03/20/2017 01:10:37.915 5 qtmsclcp.C 00639 CNEWMAIL STATE -- never sent
03/20/2017 01:10:37.915 5 qtmsclnt.C 01445 client_main: started
03/20/2017 01:10:37.915 5 qtmsclnt.C 09176 client_main: request param 1,call init_client
03/20/2017 01:10:37.915 5 qtmsclnt.C 02253 init_conn_slot: started
03/20/2017 01:10:37.915 5 qtmsclnt.C 02310 init_conn_slot: ended
03/20/2017 01:10:37.915 5 qtmsclnt.C 01793 init_client: started
03/20/2017 01:10:37.915 5 qtmsclnt.C 09176 get_trim_str: to_str length 7,radile
03/20/2017 01:10:37.915 5 qtmsclnt.C 09176 get_trim_str: to_str length 11,radile.com
03/20/2017 01:10:37.915 5 qtmsbmxs.C 00164 CLTBNDIP6
03/20/2017 01:10:37.916 5 qtmsbmxs.C 00281 Need to load file, and clear array
03/20/2017 01:10:37.916 5 qtmsbmxs.C 00385 OPENED DB FILE QUSRSYS/QATMIP6IFC(CLTBNDIP6), #recs = 1
03/20/2017 01:10:37.917 5 qtmsbmxs.C 00138 CLTBNDIP4
03/20/2017 01:10:37.921 5 qtmsbmxs.C 00281 Need to load file, and clear array
03/20/2017 01:10:37.921 5 qtmsbmxs.C 00385 OPENED DB FILE QUSRSYS/QATMIFCLST(CLNTBNDIP), #recs = 2
03/20/2017 01:10:37.921 5 qtmsbmxs.C 00649 adding ::FFFF:192.168.0.220
03/20/2017 01:10:37.921 5 qtmsbmxs.C 00664 CLTBNDIP4 only allows 1 record
03/20/2017 01:10:37.921 5 qtmsbmxs.C 00922 CLTBNDIP4 ::FFFF:192.168.0.220
03/20/2017 01:10:37.922 5 qtmsclnt.C 01853 Clnt Bind IP Addr = ::ffff:192.168.0.220
03/20/2017 01:10:37.922 5 qtmsclnt.C 01862 init_client: ended
03/20/2017 01:10:37.922 5 qtmsclnt.C 01554 client_main: ended with return code 0
03/20/2017 01:10:37.922 5 qtmsclnt.C 12240 retrieve_addresses start
03/20/2017 01:10:37.922 5 qtmsclnt.C 12256 Full Route: 
03/20/2017 01:10:37.922 5 qtmsclnt.C 12256
03/20/2017 01:10:37.922 5 qtmsclnt.C 12257 RCPT STATE: 0
03/20/2017 01:10:37.922 5 qtmsclnt.C 12294 Absolute Address: nandelin@nandelin.com
03/20/2017 01:10:37.928 5 qtmsclnt.C 12317 HUBSVR being used.   All email will be forwarded there
03/20/2017 01:10:37.928 5 qtmsclnt.C 12357 Current recipient is 
03/20/2017 01:10:37.928 5 qtmsclnt.C 12357
03/20/2017 01:10:37.928 5 qtmsclnt.C 12358 Current email domain is smtp-relay.gmail.com
03/20/2017 01:10:37.928 5 qtmsclnt.C 12375 Domain has not been resolved yet
03/20/2017 01:10:37.928 5 qtmsgmxp.C 00584 host SMTP-RELAY.GMAIL.COM was not found in LHT
03/20/2017 01:10:37.928 5 qtmsgmxp.C 00727 Resolving MX for SMTP-RELAY.GMAIL.COM
03/20/2017 01:10:37.967 5 qtmsgmxp.C 00290 Header Info
03/20/2017 01:10:37.967 5 qtmsgmxp.C 00291 ID=27987, QR=1, OPCODE = 0
03/20/2017 01:10:37.967 5 qtmsgmxp.C 00293 AA=0,TC=0,RD=1,RA=1,Z=0,RCODE=0
03/20/2017 01:10:37.967 5 qtmsgmxp.C 00295 Question Section: Count =1
03/20/2017 01:10:37.967 5 qtmsgmxp.C 00343 SMTP-RELAY.GMAIL.COM IN MX
03/20/2017 01:10:37.967 5 qtmsgmxp.C 00344 Answer Section: Count =1
03/20/2017 01:10:37.967 5 qtmsgmxp.C 00146 RR NAME=SMTP-RELAY.gmail.com
03/20/2017 01:10:37.967 5 qtmsgmxp.C 00162 RR TYPE=5(CNAME)
03/20/2017 01:10:37.967 5 qtmsgmxp.C 00170 RR CLASS=1
03/20/2017 01:10:37.967 5 qtmsgmxp.C 00177 TTL =240
03/20/2017 01:10:37.967 5 qtmsgmxp.C 00184 RDLEN =28
03/20/2017 01:10:37.967 5 qtmsgmxp.C 00230 rr 0 was good, adding to list
03/20/2017 01:10:37.973 5 qtmsgmxp.C 00231 domain = gmail-smtp-relay.l.google.COM
03/20/2017 01:10:37.973 5 qtmsgmxp.C 00352 Valid answers: 1
03/20/2017 01:10:37.973 5 qtmsgmxp.C 00357 got answer, query done
03/20/2017 01:10:37.973 5 qtmsgmxp.C 00756 MX for SMTP-RELAY.GMAIL.COM found priority 0, domain gmail-smtp-relay.l.google.COM
03/20/2017 01:10:37.983 5 qtmsclnt.C 12470 Resolve worked
03/20/2017 01:10:37.983 5 qtmsclnt.C 12482 [MX: gmail-smtp-relay.l.google.COM,priority=0]
03/20/2017 01:10:37.983 5 qtmsclnt.C 12503 ::ffff:74.125.28.28
03/20/2017 01:10:37.983 5 qtmsclnt.C 12522 Listing Rcpt by domain
03/20/2017 01:10:37.983 5 qtmsclnt.C 12527 [smtp-relay.gmail.com]
03/20/2017 01:10:37.983 5 qtmsclnt.C 12531 
03/20/2017 01:10:37.983 5 qtmsclnt.C 12531
03/20/2017 01:10:37.983 5 qtmsclnt.C 12549 retrieve_addresses end
03/20/2017 01:10:37.983 5 qtmsclnt.C 01445 client_main: started
03/20/2017 01:10:37.988 5 qtmsclnt.C 09176 client_main: request param 3,call ckmailstate
03/20/2017 01:10:37.988 5 qtmsclnt.C 01973 newconn: started
03/20/2017 01:10:37.988 5 qtmsclnt.C 01980 attempting conns for domain
03/20/2017 01:10:37.988 5 qtmsclnt.C 01984 smtp-relay.gmail.com
03/20/2017 01:10:37.988 5 qtmsclnt.C 02002 There were resolved recipients to send
03/20/2017 01:10:37.988 5 qtmsclnt.C 02019 Attempting conn to
03/20/2017 01:10:37.988 5 qtmsclnt.C 02020 ::ffff:74.125.28.28
03/20/2017 01:10:37.989 5 qtmsclnt.C 02155 getsocket: started
03/20/2017 01:10:37.991 5 qtmsclnt.C 09176 getsocket: sk des 0,Options: non-block, min delay
03/20/2017 01:10:37.991 5 qtmsclnt.C 02197 getsocket: ended with return code 0
03/20/2017 01:10:37.991 5 qtmsclnt.C 02767 attempt_connection: started
03/20/2017 01:10:37.992 5 qtmsclnt.C 02783 Socket Des = 0; Connecting to IP Addr = ::ffff:74.125.28.28, port=25
03/20/2017 01:10:37.992 5 qtmsclnt.C 02829 Will attempt to BIND to Client Bindings IP addr = ::ffff:192.168.0.220
03/20/2017 01:10:37.992 5 qtmsclnt.C 02859 Successful: BIND to IP addr = ::ffff:192.168.0.220
03/20/2017 01:10:37.992 5 qtmsclnt.C 09176 attempt_connection: errno 3430,connect INPROGRESS, try POLL
03/20/2017 01:10:38.030 5 qtmsclnt.C 02968 attempt_connection: ended with return code 0
03/20/2017 01:10:38.030 5 qtmsclnt.C 09176 newconn: done 1,breaking out
03/20/2017 01:10:38.030 5 qtmsclnt.C 02093 newconn: ended with return code 0
03/20/2017 01:10:38.030 5 qtmsclnt.C 01554 client_main: ended with return code 0
03/20/2017 01:10:38.043 5 qtmsclnt.C 01445 client_main: started
03/20/2017 01:10:38.043 5 qtmsclnt.C 09176 client_main: request param 4,call processconn
03/20/2017 01:10:38.043 5 qtmsclnt.C 02427 processconn: started
03/20/2017 01:10:38.043 5 qtmsclnt.C 02432 current state CREPLYOPEN
03/20/2017 01:10:38.043 5 qtmsclnt.C 05231 replyopen: started
03/20/2017 01:10:38.108 5 qtmsclnt.C 06749 ConnType 0
03/20/2017 01:10:38.108 5 qtmsclnt.C 06806 getreplydata: len 58
03/20/2017 01:10:38.108 5 qtmsclnt.C 06807 Recv String:
03/20/2017 01:10:38.108 5 qtmsclnt.C 06808 220 smtp-relay.gmail.com ESMTP 137sm3070475itk.4 - gsmtp
03/20/2017 01:10:38.108 5 qtmsclnt.C 06851 getreplydata: len 56,220 smtp-relay.gmail.com ESMTP 137sm3070475itk.4 -
03/20/2017 01:10:38.108 5 qtmsclnt.C 10080 Entering qtms_CheckSSL().
03/20/2017 01:10:38.460 5 qtmsclnt.C 10364 Return from qtmf_CheckSSL is 1.
03/20/2017 01:10:38.460 5 qtmsclnt.C 09176 replyopen: set conn state to 9,call doehlo
03/20/2017 01:10:38.465 5 qtmsclnt.C 03361 doehlo: started
03/20/2017 01:10:38.465 5 qtmsclnt.C 09176 doehlo: cmd len 24,EHLO radile.radile.com
03/20/2017 01:10:38.465 5 qtmsclnt.C 03427 Sending String:
03/20/2017 01:10:38.465 5 qtmsclnt.C 03428 EHLO radile.radile.com
03/20/2017 01:10:38.465 5 qtmsclnt.C 05052 writecmd: started
03/20/2017 01:10:38.465 5 qtmsclnt.C 09176 writecmd: before write offset is 0,in conn_dataline
03/20/2017 01:10:38.465 5 qtmsclnt.C 09176 writecmd: all sent, change state to 32,len, off set to 0
03/20/2017 01:10:38.465 5 qtmsclnt.C 05176 writecmd: ended with return code 0
03/20/2017 01:10:38.465 5 qtmsclnt.C 03440 doehlo: ended with return code 0
03/20/2017 01:10:38.465 5 qtmsclnt.C 05331 replyopen: ended with return code 0
03/20/2017 01:10:38.465 5 qtmsclnt.C 02700 current state next CREPLYEHLO
03/20/2017 01:10:38.465 5 qtmsclnt.C 02703 processconn: ended with return code 0
03/20/2017 01:10:38.465 5 qtmsclnt.C 01554 client_main: ended with return code 0
03/20/2017 01:10:38.465 5 qtmsclnt.C 01445 client_main: started
03/20/2017 01:10:38.465 5 qtmsclnt.C 09176 client_main: request param 4,call processconn
03/20/2017 01:10:38.465 5 qtmsclnt.C 02427 processconn: started
03/20/2017 01:10:38.465 5 qtmsclnt.C 02432 current state CREPLYEHLO
03/20/2017 01:10:38.465 5 qtmsclnt.C 05518 replyehlo: started
03/20/2017 01:10:38.544 5 qtmsclnt.C 06749 ConnType 0
03/20/2017 01:10:38.548 5 qtmsclnt.C 06806 getreplydata: len 176
03/20/2017 01:10:38.548 5 qtmsclnt.C 06807 Recv String:
03/20/2017 01:10:38.548 5 qtmsclnt.C 06808 250-smtp-relay.gmail.com at your service, ¢67.40.109.140!
03/20/2017 01:10:38.548 5 qtmsclnt.C 06808 250-SIZE 157286400
03/20/2017 01:10:38.548 5 qtmsclnt.C 06808 250-8BITMIME
03/20/2017 01:10:38.548 5 qtmsclnt.C 06808 250-STARTTLS
03/20/2017 01:10:38.548 5 qtmsclnt.C 06808 250-ENHANCEDSTATUSCODES
03/20/2017 01:10:38.548 5 qtmsclnt.C 06808 250-PIPELINING
03/20/2017 01:10:38.548 5 qtmsclnt.C 06808 250-CHUNKING
03/20/2017 01:10:38.548 5 qtmsclnt.C 06808 250 SMTPUTF8
03/20/2017 01:10:38.548 5 qtmsclnt.C 06851 getreplydata: len 57,250-smtp-relay.gmail.com at your service, ¢67.40.1
03/20/2017 01:10:38.548 5 qtmsclnt.C 09176 hyphen found in reply: len 57,250-smtp-relay.gmail.com at your service, ¢67.40.109.14
03/20/2017 01:10:38.548 5 qtmsclnt.C 09176 !
03/20/2017 01:10:38.553 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.553 5 qtmsclnt.C 06851 getreplydata: len 18,250-SIZE 157286400
03/20/2017 01:10:38.553 5 qtmsclnt.C 09176 hyphen found in reply: len 18,250-SIZE 157286400
03/20/2017 01:10:38.553 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.553 5 qtmsclnt.C 06851 getreplydata: len 12,250-8BITMIME
03/20/2017 01:10:38.553 5 qtmsclnt.C 09176 hyphen found in reply: len 12,250-8BITMIME
03/20/2017 01:10:38.553 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.553 5 qtmsclnt.C 06851 getreplydata: len 12,250-STARTTLS
03/20/2017 01:10:38.553 5 qtmsclnt.C 06872 STARTTLS support available
03/20/2017 01:10:38.553 5 qtmsclnt.C 09176 hyphen found in reply: len 12,250-STARTTLS
03/20/2017 01:10:38.553 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.553 5 qtmsclnt.C 06851 getreplydata: len 23,250-ENHANCEDSTATUSCODES
03/20/2017 01:10:38.553 5 qtmsclnt.C 09176 hyphen found in reply: len 23,250-ENHANCEDSTATUSCODES
03/20/2017 01:10:38.553 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.553 5 qtmsclnt.C 06851 getreplydata: len 14,250-PIPELINING
03/20/2017 01:10:38.553 5 qtmsclnt.C 09176 hyphen found in reply: len 14,250-PIPELINING
03/20/2017 01:10:38.553 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.553 5 qtmsclnt.C 06851 getreplydata: len 12,250-CHUNKING
03/20/2017 01:10:38.553 5 qtmsclnt.C 09176 hyphen found in reply: len 12,250-CHUNKING
03/20/2017 01:10:38.563 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.563 5 qtmsclnt.C 06851 getreplydata: len 12,250 SMTPUTF8
03/20/2017 01:10:38.563 5 qtmsclnt.C 09176 replyehlo: set conn state to 13,call dostarttls
03/20/2017 01:10:38.563 5 qtmsclnt.C 11841 getAuthParm: started
03/20/2017 01:10:38.563 5 qtmsclnt.C 09176 getAuthParm: domain= 0,smtp-relay.gmail.com
03/20/2017 01:10:38.563 5 qtmsclnt.C 09176 get_trim_str: to_str length 21,nandelin@nandelin.com
03/20/2017 01:10:38.564 5 qtmsclnt.C 12114 CheckfTrace: CPF1015
03/20/2017 01:10:38.564 5 qtmsclnt.C 12022 getAuthParm: keysize 56 24 8
03/20/2017 01:10:38.564 5 qtmsclnt.C 12031 getAuthParm: ended with return code 1
03/20/2017 01:10:38.564 5 qtmsclnt.C 10668 dostarttls: started
03/20/2017 01:10:38.564 5 qtmsclnt.C 09176 dostarttls: cmd len 10,STARTTLS
03/20/2017 01:10:38.564 5 qtmsclnt.C 05052 writecmd: started
03/20/2017 01:10:38.564 5 qtmsclnt.C 09176 writecmd: before write offset is 0,in conn_dataline
03/20/2017 01:10:38.565 5 qtmsclnt.C 09176 writecmd: all sent, change state to 33,len, off set to 0
03/20/2017 01:10:38.565 5 qtmsclnt.C 05176 writecmd: ended with return code 0
03/20/2017 01:10:38.565 5 qtmsclnt.C 10709 dostarttls: ended with return code 0
03/20/2017 01:10:38.565 5 qtmsclnt.C 05651 replyehlo: ended with return code 0
03/20/2017 01:10:38.565 5 qtmsclnt.C 02700 current state next CREPLYSTARTTLS
03/20/2017 01:10:38.565 5 qtmsclnt.C 02703 processconn: ended with return code 0
03/20/2017 01:10:38.565 5 qtmsclnt.C 01554 client_main: ended with return code 0
03/20/2017 01:10:38.565 5 qtmsclnt.C 01445 client_main: started
03/20/2017 01:10:38.565 5 qtmsclnt.C 09176 client_main: request param 4,call processconn
03/20/2017 01:10:38.565 5 qtmsclnt.C 02427 processconn: started
03/20/2017 01:10:38.565 5 qtmsclnt.C 02432 current state CREPLYSTARTTLS
03/20/2017 01:10:38.565 5 qtmsclnt.C 11217 replystarttls: started
03/20/2017 01:10:38.640 5 qtmsclnt.C 06749 ConnType 0
03/20/2017 01:10:38.640 5 qtmsclnt.C 06806 getreplydata: len 30
03/20/2017 01:10:38.640 5 qtmsclnt.C 06807 Recv String:
03/20/2017 01:10:38.640 5 qtmsclnt.C 06808 220 2.0.0 Ready to start TLS
03/20/2017 01:10:38.640 5 qtmsclnt.C 06851 getreplydata: len 28,220 2.0.0 Ready to start TLS
03/20/2017 01:10:38.641 5 qtmsclnt.C 09176 replystarttls: set conn state to 9,call doehlo
03/20/2017 01:10:38.641 5 qtmsclnt.C 10410    ...Entering Create TLS Session().: started
03/20/2017 01:10:38.727 5 qtmsclnt.C 10534    ...Leaving Create TLS Session().
03/20/2017 01:10:38.727 5 qtmsclnt.C 03361 doehlo: started
03/20/2017 01:10:38.727 5 qtmsclnt.C 09176 doehlo: cmd len 24,EHLO radile.radile.com
03/20/2017 01:10:38.727 5 qtmsclnt.C 03427 Sending String:
03/20/2017 01:10:38.727 5 qtmsclnt.C 03428 EHLO radile.radile.com
03/20/2017 01:10:38.727 5 qtmsclnt.C 05052 writecmd: started
03/20/2017 01:10:38.727 5 qtmsclnt.C 09176 writecmd: before write offset is 0,in conn_dataline
03/20/2017 01:10:38.727 5 qtmsclnt.C 09176 writecmd: all sent, change state to 32,len, off set to 0
03/20/2017 01:10:38.727 5 qtmsclnt.C 05176 writecmd: ended with return code 0
03/20/2017 01:10:38.727 5 qtmsclnt.C 03440 doehlo: ended with return code 0
03/20/2017 01:10:38.727 5 qtmsclnt.C 11280 replystarttls: ended with return code 0
03/20/2017 01:10:38.727 5 qtmsclnt.C 02700 current state next CREPLYEHLO
03/20/2017 01:10:38.727 5 qtmsclnt.C 02703 processconn: ended with return code 0
03/20/2017 01:10:38.727 5 qtmsclnt.C 01554 client_main: ended with return code 0
03/20/2017 01:10:38.727 5 qtmsclnt.C 01445 client_main: started
03/20/2017 01:10:38.727 5 qtmsclnt.C 09176 client_main: request param 4,call processconn
03/20/2017 01:10:38.727 5 qtmsclnt.C 02427 processconn: started
03/20/2017 01:10:38.727 5 qtmsclnt.C 02432 current state CREPLYEHLO
03/20/2017 01:10:38.728 5 qtmsclnt.C 05518 replyehlo: started
03/20/2017 01:10:38.803 5 qtmsclnt.C 06749 ConnType 1
03/20/2017 01:10:38.803 5 qtmsclnt.C 06806 getreplydata: len 229
03/20/2017 01:10:38.803 5 qtmsclnt.C 06807 Recv String:
03/20/2017 01:10:38.803 5 qtmsclnt.C 06808 250-smtp-relay.gmail.com at your service, ¢67.40.109.140!
03/20/2017 01:10:38.803 5 qtmsclnt.C 06808 250-SIZE 157286400
03/20/2017 01:10:38.803 5 qtmsclnt.C 06808 250-8BITMIME
03/20/2017 01:10:38.803 5 qtmsclnt.C 06808 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
03/20/2017 01:10:38.803 5 qtmsclnt.C 06808 250-ENHANCEDSTATUSCODES
03/20/2017 01:10:38.803 5 qtmsclnt.C 06808 250-PIPELINING
03/20/2017 01:10:38.803 5 qtmsclnt.C 06808 250-CHUNKING
03/20/2017 01:10:38.803 5 qtmsclnt.C 06808 250 SMTPUTF8
03/20/2017 01:10:38.803 5 qtmsclnt.C 06851 getreplydata: len 57,250-smtp-relay.gmail.com at your service, ¢67.40.1
03/20/2017 01:10:38.803 5 qtmsclnt.C 09176 hyphen found in reply: len 57,250-smtp-relay.gmail.com at your service, ¢67.40.109.14
03/20/2017 01:10:38.803 5 qtmsclnt.C 09176 !
03/20/2017 01:10:38.804 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.804 5 qtmsclnt.C 06851 getreplydata: len 18,250-SIZE 157286400
03/20/2017 01:10:38.804 5 qtmsclnt.C 09176 hyphen found in reply: len 18,250-SIZE 157286400
03/20/2017 01:10:38.804 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.804 5 qtmsclnt.C 06851 getreplydata: len 12,250-8BITMIME
03/20/2017 01:10:38.804 5 qtmsclnt.C 09176 hyphen found in reply: len 12,250-8BITMIME
03/20/2017 01:10:38.804 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.804 5 qtmsclnt.C 06851 getreplydata: len 65,250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAU
03/20/2017 01:10:38.804 5 qtmsclnt.C 06878 Authentication support available
03/20/2017 01:10:38.804 5 qtmsclnt.C 06888 Authentication Type is PLAIN
03/20/2017 01:10:38.804 5 qtmsclnt.C 09176 hyphen found in reply: len 65,250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEA
03/20/2017 01:10:38.804 5 qtmsclnt.C 09176 ER XOAUTH
03/20/2017 01:10:38.805 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.805 5 qtmsclnt.C 06851 getreplydata: len 23,250-ENHANCEDSTATUSCODES
03/20/2017 01:10:38.805 5 qtmsclnt.C 09176 hyphen found in reply: len 23,250-ENHANCEDSTATUSCODES
03/20/2017 01:10:38.805 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.805 5 qtmsclnt.C 06851 getreplydata: len 14,250-PIPELINING
03/20/2017 01:10:38.805 5 qtmsclnt.C 09176 hyphen found in reply: len 14,250-PIPELINING
03/20/2017 01:10:38.805 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.805 5 qtmsclnt.C 06851 getreplydata: len 12,250-CHUNKING
03/20/2017 01:10:38.805 5 qtmsclnt.C 09176 hyphen found in reply: len 12,250-CHUNKING
03/20/2017 01:10:38.805 5 qtmsclnt.C 06949 More reply data to come...
03/20/2017 01:10:38.805 5 qtmsclnt.C 06851 getreplydata: len 12,250 SMTPUTF8
03/20/2017 01:10:38.805 5 qtmsclnt.C 09176 replyehlo: set conn state to 14,call doauth
03/20/2017 01:10:38.805 5 qtmsclnt.C 10795 doauth: started
03/20/2017 01:10:38.805 5 qtmsclnt.C 09176 doauth: cmd len 11,AUTH PLAIN
03/20/2017 01:10:38.805 5 qtmsclnt.C 05052 writecmd: started
03/20/2017 01:10:38.805 5 qtmsclnt.C 09176 writecmd: before write offset is 0,in conn_dataline
03/20/2017 01:10:38.805 5 qtmsclnt.C 09176 writecmd: all sent, change state to 34,len, off set to 0
03/20/2017 01:10:38.805 5 qtmsclnt.C 05176 writecmd: ended with return code 0
03/20/2017 01:10:38.805 5 qtmsclnt.C 10905 doauth: ended with return code 0
03/20/2017 01:10:38.806 5 qtmsclnt.C 05651 replyehlo: ended with return code 0
03/20/2017 01:10:38.806 5 qtmsclnt.C 02700 current state next CREPLYAUTH
03/20/2017 01:10:38.806 5 qtmsclnt.C 02703 processconn: ended with return code 0
03/20/2017 01:10:38.806 5 qtmsclnt.C 01554 client_main: ended with return code 0
03/20/2017 01:10:38.806 5 qtmsclnt.C 01445 client_main: started
03/20/2017 01:10:38.806 5 qtmsclnt.C 09176 client_main: request param 4,call processconn
03/20/2017 01:10:38.806 5 qtmsclnt.C 02427 processconn: started
03/20/2017 01:10:38.806 5 qtmsclnt.C 02432 current state CREPLYAUTH
03/20/2017 01:10:38.806 5 qtmsclnt.C 11355 replyauth: started
03/20/2017 01:10:39.056 5 qtmsclnt.C 06749 ConnType 1
03/20/2017 01:10:39.056 5 qtmsclnt.C 06806 getreplydata: len 20
03/20/2017 01:10:39.056 5 qtmsclnt.C 06807 Recv String:
03/20/2017 01:10:39.056 5 qtmsclnt.C 06808 235 2.7.0 Accepted
03/20/2017 01:10:39.057 5 qtmsclnt.C 06851 getreplydata: len 18,235 2.7.0 Accepted
03/20/2017 01:10:39.057 5 qtmsclnt.C 09176 replyauth: set conn state to 7,call domail
03/20/2017 01:10:39.057 5 qtmsclnt.C 03513 domail: started
03/20/2017 01:10:39.057 5 qtmsclnt.C 09176 get_trim_str: to_str length 21,
03/20/2017 01:10:39.057 5 qtmsclnt.C 09176 domail: cmd len 33,MAIL FROM:
03/20/2017 01:10:39.057 5 qtmsclnt.C 03673 Sending String:
03/20/2017 01:10:39.057 5 qtmsclnt.C 03674 MAIL FROM:
03/20/2017 01:10:39.057 5 qtmsclnt.C 05052 writecmd: started
03/20/2017 01:10:39.057 5 qtmsclnt.C 09176 writecmd: before write offset is 0,in conn_dataline
03/20/2017 01:10:39.057 5 qtmsclnt.C 09176 writecmd: all sent, change state to 23,len, off set to 0
03/20/2017 01:10:39.057 5 qtmsclnt.C 05176 writecmd: ended with return code 0
03/20/2017 01:10:39.057 5 qtmsclnt.C 03685 domail: ended with return code 0
03/20/2017 01:10:39.057 5 qtmsclnt.C 11446 replyauth: ended with return code 0
03/20/2017 01:10:39.057 5 qtmsclnt.C 02700 current state next CREPLYMAIL
03/20/2017 01:10:39.057 5 qtmsclnt.C 02703 processconn: ended with return code 0
03/20/2017 01:10:39.057 5 qtmsclnt.C 01554 client_main: ended with return code 0
03/20/2017 01:10:39.057 5 qtmsclnt.C 01445 client_main: started
03/20/2017 01:10:39.057 5 qtmsclnt.C 09176 client_main: request param 4,call processconn
03/20/2017 01:10:39.057 5 qtmsclnt.C 02427 processconn: started
03/20/2017 01:10:39.057 5 qtmsclnt.C 02432 current state CREPLYMAIL
03/20/2017 01:10:39.057 5 qtmsclnt.C 05706 replymail: started
03/20/2017 01:10:39.172 5 qtmsclnt.C 06749 ConnType 1
03/20/2017 01:10:39.172 5 qtmsclnt.C 06806 getreplydata: len 40
03/20/2017 01:10:39.172 5 qtmsclnt.C 06807 Recv String:
03/20/2017 01:10:39.172 5 qtmsclnt.C 06808 250 2.1.0 OK 137sm3070475itk.4 - gsmtp
03/20/2017 01:10:39.172 5 qtmsclnt.C 06851 getreplydata: len 38,250 2.1.0 OK 137sm3070475itk.4 - gsmtp
03/20/2017 01:10:39.172 5 qtmsclnt.C 09176 replymail: set conn state to 3,call dorcpt
03/20/2017 01:10:39.172 5 qtmsclnt.C 03829 dorcpt: started
03/20/2017 01:10:39.172 5 qtmsclnt.C 03743 build_forwardpath: started
03/20/2017 01:10:39.172 5 qtmsclnt.C 09176 get_trim_str: to_str length 23,
03/20/2017 01:10:39.172 5 qtmsclnt.C 03748 build_forwardpath: ended
03/20/2017 01:10:39.172 5 qtmsclnt.C 09176 dorcpt: cmd len 33,RCPT TO:
03/20/2017 01:10:39.172 5 qtmsclnt.C 03913 Sending String:
03/20/2017 01:10:39.172 5 qtmsclnt.C 03914 RCPT TO:
03/20/2017 01:10:39.172 5 qtmsclnt.C 05052 writecmd: started
03/20/2017 01:10:39.172 5 qtmsclnt.C 09176 writecmd: before write offset is 0,in conn_dataline
03/20/2017 01:10:39.172 5 qtmsclnt.C 09176 writecmd: all sent, change state to 19,len, off set to 0
03/20/2017 01:10:39.172 5 qtmsclnt.C 05176 writecmd: ended with return code 0
03/20/2017 01:10:39.172 5 qtmsclnt.C 03925 dorcpt: ended with return code 0
03/20/2017 01:10:39.172 5 qtmsclnt.C 05782 replymail: ended with return code 0
03/20/2017 01:10:39.173 5 qtmsclnt.C 02700 current state next CREPLYRCPT
03/20/2017 01:10:39.173 5 qtmsclnt.C 02703 processconn: ended with return code 0
03/20/2017 01:10:39.173 5 qtmsclnt.C 01554 client_main: ended with return code 0
03/20/2017 01:10:39.173 5 qtmsclnt.C 01445 client_main: started
03/20/2017 01:10:39.173 5 qtmsclnt.C 09176 client_main: request param 4,call processconn
03/20/2017 01:10:39.173 5 qtmsclnt.C 02427 processconn: started
03/20/2017 01:10:39.173 5 qtmsclnt.C 02432 current state CREPLYRCPT
03/20/2017 01:10:39.173 5 qtmsclnt.C 05848 replyrcpt: started
03/20/2017 01:10:39.249 5 qtmsclnt.C 06749 ConnType 1
03/20/2017 01:10:39.249 5 qtmsclnt.C 06806 getreplydata: len 40
03/20/2017 01:10:39.249 5 qtmsclnt.C 06807 Recv String:
03/20/2017 01:10:39.250 5 qtmsclnt.C 06808 250 2.1.5 OK 137sm3070475itk.4 - gsmtp
03/20/2017 01:10:39.250 5 qtmsclnt.C 06851 getreplydata: len 38,250 2.1.5 OK 137sm3070475itk.4 - gsmtp
03/20/2017 01:10:39.250 5 qtmsclnt.C 03983 dodata: started
03/20/2017 01:10:39.250 5 qtmsclnt.C 09176 dodata: cmd len 6,DATA
03/20/2017 01:10:39.250 5 qtmsclnt.C 04012 Sending String:
03/20/2017 01:10:39.250 5 qtmsclnt.C 04013 DATA
03/20/2017 01:10:39.250 5 qtmsclnt.C 05052 writecmd: started
03/20/2017 01:10:39.250 5 qtmsclnt.C 09176 writecmd: before write offset is 0,in conn_dataline
03/20/2017 01:10:39.250 5 qtmsclnt.C 09176 writecmd: all sent, change state to 20,len, off set to 0
03/20/2017 01:10:39.250 5 qtmsclnt.C 05176 writecmd: ended with return code 0
03/20/2017 01:10:39.250 5 qtmsclnt.C 04024 dodata: ended with return code 0
03/20/2017 01:10:39.250 5 qtmsclnt.C 06036 replyrcpt: ended with return code 0
03/20/2017 01:10:39.250 5 qtmsclnt.C 02700 current state next CREPLYDATA
03/20/2017 01:10:39.250 5 qtmsclnt.C 02703 processconn: ended with return code 0
03/20/2017 01:10:39.250 5 qtmsclnt.C 01554 client_main: ended with return code 0
03/20/2017 01:10:39.250 5 qtmsclnt.C 01445 client_main: started
03/20/2017 01:10:39.250 5 qtmsclnt.C 09176 client_main: request param 4,call processconn
03/20/2017 01:10:39.250 5 qtmsclnt.C 02427 processconn: started
03/20/2017 01:10:39.250 5 qtmsclnt.C 02432 current state CREPLYDATA
03/20/2017 01:10:39.250 5 qtmsclnt.C 06203 replydata: started
03/20/2017 01:10:39.326 5 qtmsclnt.C 06749 ConnType 1
03/20/2017 01:10:39.326 5 qtmsclnt.C 06806 getreplydata: len 41
03/20/2017 01:10:39.326 5 qtmsclnt.C 06807 Recv String:
03/20/2017 01:10:39.326 5 qtmsclnt.C 06808 354  Go ahead 137sm3070475itk.4 - gsmtp
03/20/2017 01:10:39.326 5 qtmsclnt.C 06851 getreplydata: len 39,354  Go ahead 137sm3070475itk.4 - gsmtp
03/20/2017 01:10:39.326 5 qtmsclnt.C 06095 init_send_buff: started
03/20/2017 01:10:39.326 5 qtmsgfo.C  00727 Entering the FSO_read().
03/20/2017 01:10:39.326 5 qtmsgfo.C  00741 FSO_read: FuncReq = 1
03/20/2017 01:10:39.326 5 qtmsgfo.C  00821 Calling the GFS Read module.
03/20/2017 01:10:39.326 5 qtmsgfo.C  00948 FSO_read: FSO_lgth = '18a'x
03/20/2017 01:10:39.326 5 qtmsgfo.C  00986 Exitting the FSO_read().
03/20/2017 01:10:39.326 5 qtmsclnt.C 04733 sendbuff: started
03/20/2017 01:10:39.327 5 qtmsgfo.C  00727 Entering the FSO_read().
03/20/2017 01:10:39.327 5 qtmsgfo.C  00741 FSO_read: FuncReq = 2
03/20/2017 01:10:39.327 5 qtmsgfo.C  00762 FSO_read: Buff_lgth = '2000'x
03/20/2017 01:10:39.327 5 qtmsgfo.C  00821 Calling the GFS Read module.
03/20/2017 01:10:39.327 5 qtmsgfo.C  00850 FSO_read - EOD detected in data.
03/20/2017 01:10:39.327 5 qtmsgfo.C  00959 FSO_read: Data_lgth = '18a'x
03/20/2017 01:10:39.327 5 qtmsgfo.C  00986 Exitting the FSO_read().
03/20/2017 01:10:39.327 5 qtmsclnt.C 04647 Number of bytes read from FSO = 394.
03/20/2017 01:10:39.327 5 qtmsgfo.C  00727 Entering the FSO_read().
03/20/2017 01:10:39.327 5 qtmsgfo.C  00741 FSO_read: FuncReq = 2
03/20/2017 01:10:39.327 5 qtmsgfo.C  00762 FSO_read: Buff_lgth = '2000'x
03/20/2017 01:10:39.327 5 qtmsgfo.C  00821 Calling the GFS Read module.
03/20/2017 01:10:39.327 5 qtmsgfo.C  00850 FSO_read - EOD detected in data.
03/20/2017 01:10:39.328 5 qtmsgfo.C  00959 FSO_read: Data_lgth = '0'x
03/20/2017 01:10:39.328 5 qtmsgfo.C  00986 Exitting the FSO_read().
03/20/2017 01:10:39.328 5 qtmsclnt.C 04647 Number of bytes read from FSO = 0.
03/20/2017 01:10:39.328 5 qtmsgfo.C  00727 Entering the FSO_read().
03/20/2017 01:10:39.328 5 qtmsgfo.C  00741 FSO_read: FuncReq = 3
03/20/2017 01:10:39.328 5 qtmsgfo.C  00821 Calling the GFS Read module.
03/20/2017 01:10:39.328 5 qtmsgfo.C  00986 Exitting the FSO_read().
03/20/2017 01:10:39.328 5 qtmsclnt.C 04882 dodot: started
03/20/2017 01:10:39.328 5 qtmsclnt.C 09176 dodot: cmd len 5,
03/20/2017 01:10:39.328 5 qtmsclnt.C 09176 .
03/20/2017 01:10:39.328 5 qtmsclnt.C 05052 writecmd: started
03/20/2017 01:10:39.328 5 qtmsclnt.C 09176 writecmd: before write offset is 0,in conn_dataline
03/20/2017 01:10:39.328 5 qtmsclnt.C 09176 writecmd: all sent, change state to 21,len, off set to 0
03/20/2017 01:10:39.328 5 qtmsclnt.C 05176 writecmd: ended with return code 0
03/20/2017 01:10:39.328 5 qtmsclnt.C 04912 dodot: ended with return code 0
03/20/2017 01:10:39.328 5 qtmsclnt.C 04819 sendbuff: ended with return code 0
03/20/2017 01:10:39.328 5 qtmsclnt.C 06147 init_send_buff: ended with return code 0
03/20/2017 01:10:39.328 5 qtmsclnt.C 06315 replydata: ended with return code 0
03/20/2017 01:10:39.328 5 qtmsclnt.C 02700 current state next CREPLYDOT
03/20/2017 01:10:39.329 5 qtmsclnt.C 02703 processconn: ended with return code 0
03/20/2017 01:10:39.329 5 qtmsclnt.C 01554 client_main: ended with return code 0
03/20/2017 01:10:39.329 5 qtmsclnt.C 01445 client_main: started
03/20/2017 01:10:39.329 5 qtmsclnt.C 09176 client_main: request param 4,call processconn
03/20/2017 01:10:39.329 5 qtmsclnt.C 02427 processconn: started
03/20/2017 01:10:39.329 5 qtmsclnt.C 02432 current state CREPLYDOT
03/20/2017 01:10:39.329 5 qtmsclnt.C 06383 replydot: started
03/20/2017 01:10:39.448 5 qtmsclnt.C 06749 ConnType 1
03/20/2017 01:10:39.448 5 qtmsclnt.C 06806 getreplydata: len 51
03/20/2017 01:10:39.448 5 qtmsclnt.C 06807 Recv String:
03/20/2017 01:10:39.448 5 qtmsclnt.C 06808 250 2.0.0 OK 1489972274 137sm3070475itk.4 - gsmtp
03/20/2017 01:10:39.448 5 qtmsclnt.C 06851 getreplydata: len 49,250 2.0.0 OK 1489972274 137sm3070475itk.4 - gsmtp
03/20/2017 01:10:39.450 5 qtmsclnt.C 09176 replydot: OK set conn state to 6,call doquit
03/20/2017 01:10:39.450 5 qtmsclnt.C 04970 doquit: started
03/20/2017 01:10:39.450 5 qtmsclnt.C 09176 doquit: cmd len 6,QUIT
03/20/2017 01:10:39.450 5 qtmsclnt.C 04984 Sending String:
03/20/2017 01:10:39.450 5 qtmsclnt.C 04985 QUIT
03/20/2017 01:10:39.450 5 qtmsclnt.C 05052 writecmd: started
03/20/2017 01:10:39.450 5 qtmsclnt.C 09176 writecmd: before write offset is 0,in conn_dataline
03/20/2017 01:10:39.450 5 qtmsclnt.C 09176 writecmd: all sent, change state to 22,len, off set to 0
03/20/2017 01:10:39.450 5 qtmsclnt.C 05176 writecmd: ended with return code 0
03/20/2017 01:10:39.450 5 qtmsclnt.C 04996 doquit: ended with return code 0
03/20/2017 01:10:39.450 5 qtmsclnt.C 06541 replydot: ended with return code 0
03/20/2017 01:10:39.450 5 qtmsclnt.C 02700 current state next CREPLYQUIT
03/20/2017 01:10:39.450 5 qtmsclnt.C 02703 processconn: ended with return code 0
03/20/2017 01:10:39.450 5 qtmsclnt.C 01554 client_main: ended with return code 0
03/20/2017 01:10:39.450 5 qtmsclnt.C 01445 client_main: started
03/20/2017 01:10:39.450 5 qtmsclnt.C 09176 client_main: request param 4,call processconn
03/20/2017 01:10:39.450 5 qtmsclnt.C 02427 processconn: started
03/20/2017 01:10:39.450 5 qtmsclnt.C 02432 current state CREPLYQUIT
03/20/2017 01:10:39.450 5 qtmsclnt.C 06591 replyquit: started
03/20/2017 01:10:39.526 5 qtmsclnt.C 06749 ConnType 1
03/20/2017 01:10:39.527 5 qtmsclnt.C 06806 getreplydata: len 56
03/20/2017 01:10:39.527 5 qtmsclnt.C 06807 Recv String:
03/20/2017 01:10:39.527 5 qtmsclnt.C 06808 221 2.0.0 closing connection 137sm3070475itk.4 - gsmtp
03/20/2017 01:10:39.527 5 qtmsclnt.C 06851 getreplydata: len 54,221 2.0.0 closing connection 137sm3070475itk.4 - g
03/20/2017 01:10:39.527 5 qtmsclnt.C 09176 replyquit: rc set to CFINISHED_RC 1,conversation complete.
03/20/2017 01:10:39.527 5 qtmsclnt.C 06651 replyquit: ended with return code 1
03/20/2017 01:10:39.527 5 qtmsclnt.C 02700 current state next CREPLYQUIT
03/20/2017 01:10:39.527 5 qtmsclnt.C 02703 processconn: ended with return code 1
03/20/2017 01:10:39.527 5 qtmsclnt.C 07183 clear_connection: started
03/20/2017 01:10:39.527 5 qtmsclnt.C 10572 qtms_SSLClose: started
03/20/2017 01:10:39.527 5 qtmsclnt.C 10580 Closing gsk socket rc =0
03/20/2017 01:10:39.527 5 qtmsclnt.C 10594 Closing gsk environment rc =0
03/20/2017 01:10:39.527 5 qtmsclnt.C 10610 qtms_SSLClose: ended
03/20/2017 01:10:39.527 5 qtmsclnt.C 07194 clear_connection: ended
03/20/2017 01:10:39.527 5 qtmsclnt.C 01554 client_main: ended with return code 0
03/20/2017 01:10:39.527 5 qtmsclnt.C 07279 addtoretry: started
03/20/2017 01:10:39.527 5 qtmsclnt.C 09176 addtoretry: retry lvl 0,err=0
03/20/2017 01:10:39.527 5 qtmsclnt.C 07418 No more rcpts,setting to max retry
03/20/2017 01:10:39.527 5 qtmsclnt.C 09176 addtoretry: retry lvl 2,updated recpt state, errcode in LL
03/20/2017 01:10:39.528 5 qtmsclnt.C 09176 addtoretry: mailstate 8,destroying mail
03/20/2017 01:10:39.528 5 qtmsclnt.C 07657 destroy_mail: started
03/20/2017 01:10:39.528 5 qtmsgfo.C  01235 Entering the FSO_RvkAcc().
03/20/2017 01:10:39.619 5 qtmsgfo.C  01283 Exitting the FSO_RvkAcc().
03/20/2017 01:10:39.619 5 qtmsclnt.C 09176 destroy_mail: mailstate 8,destroying mail
03/20/2017 01:10:39.619 5 qtmsclnt.C 09176 destroy_mail: mailstate 8,destroying mail
03/20/2017 01:10:39.619 5 qtmspace.C 00417 deallocating userspace QTMSMCB0000000001 in lib QUSRSYS
03/20/2017 01:10:39.677 5 qtmsclnt.C 07733 destroy_mail: ended
03/20/2017 01:10:39.677 5 qtmsclnt.C 07608 addtoretry: ended
03/20/2017 01:10:39.677 5 qtmsclcp.C 00580 >>TOP<< of the CLCP loop
03/20/2017 01:10:39.677 5 qtmsclcp.C 00584 Waiting for work

Other References

The following references were helpful to me: