IBM Support

Configuration of the IBM i SMTP Client to Relay Email to Office365 and Gmail

Question & Answer


Question

How do you configure the IBM i SMTP Client to relay email to Microsoft Office365 and Google Mail (Gmail)?

Answer

Office 365 Configuration with the IBM i SMTP Client

Refer to OPTION 3 in the Microsoft techdoc, How to set up a multifunction device or application to send email using Office 365, for detailed information on how to configure the IBM i SMTP Client to relay email to Microsoft Office 365.  Identify the IBM i server's public IP address to be used in the configuration of the Office 365 SMTP connector and your domain registrar's DNS SPF record.

Since the IBM i OS does not support the dynamic use of multiple authentication credentials based on the sender's email address, Option 1 in the Microsoft techdoc, How to set up a multifunction device or application to send email using Office 365, will NOT function with the IBM i OS.  Please refer to the "Limitations of SMTP client submission" section under Option 1 in this document for more information.

After the Office 365 configuration steps have been completed using the information above, the "Forwarding Mailhub Server" (FWDHUBSVR) SMTP Attribute will need to be changed to your specific Office 365 domain's MX endpoint host name using the CHGSMTPA FWDHUBSVR(<MX endpoint host>) CL command to complete the setup process. The change to the "Forwarding Mailhub Server" SMTP Attribute is dynamic and will take effect immediately after the CHGSMTPA FWDHUBSVR(<MX endpoint host>) CL command is executed.

If you want to configure SSL/TLS communications between the IBM i SMTP Client and Microsoft Office365 SMTP Connector, refer to the document, Configuring SSL Between IBM i and Remote Mail Router WITHOUT Authentication, to configure SSL/TLS communications when authentication with the SMTP relay is not used.

If you experience email delivery issues through Office 365 from the IBM i SMTP Client after the above configuration has been completed successfully, an IBM i SMTP Client trace can be gathered using the instructions in the URL, http://www.ibm.com/support/docview.wss?uid=nas8N1012636, to help determine the cause of your email delivery failures.

Any additional assistance with this configuration process would fall outside of the scope of the IBM Software Maintenance Agreement (SWMA) support contract and would require a per hour billable IBM i Customized Services consulting contract. Please contact IBM Support for further information.
 

Google Mail (Gmail) Configuration with the IBM i SMTP Client

Refer the URL, SMTP relay: Route outgoing non-Gmail messages through Google, for detailed information on how to configure an SMTP connector for the IBM i OS to relay email through Gmail.  NOTE:  IBM advises you to authenticate by IP address by selecting the "Only accept mail from the specified IP addresses" option on Step 7.

After the Google Mail configuration steps have been completed using the information above, the "Forwarding Mailhub Server" (FWDHUBSVR) SMTP Attribute will need to be changed to "smtp-relay.gmail.com" using the CHGSMTPA FWDHUBSVR('smtp-relay.gmail.com') CL command to complete the setup process. The change to the "Forwarding Mailhub Server" SMTP Attribute is dynamic and will take effect immediately after the CHGSMTPA FWDHUBSVR('smtp-relay.gmail.com') CL command is executed.

Next, you will need to customize the remote port value connected to by the IBM i SMTP Client when delivering email.  Refer to the following IBM Technical document on how to configure the SMTP Client to deliver mail to a Mail Router/Fowarding Hub Server on port 587.
How to Configure SMTP to Send Mail to a Mail Router that Listens on a Port Other Than Port 25

i.e. ADDENVVAR ENVVAR(QIBM_SMTP_SERVER_PORT) VALUE('587') LEVEL(*SYS)

If you want to configure SSL/TLS communications between the IBM i SMTP Client and the Gmail SMTP Connector, refer to the document, Configuring SSL Between IBM i and Remote Mail Router WITHOUT Authentication, to configure SSL/TLS communications when authentication with the SMTP relay is not used.

If you experience email delivery issues through Gmail from the IBM i SMTP Client after the above configuration has been completed successfully, an IBM i SMTP Client trace can be gathered using the instructions in the URL, http://www.ibm.com/support/docview.wss?uid=nas8N1012636, to help determine the cause of your email delivery failures.

Any additional assistance with this configuration process would fall outside of the scope of the IBM Software Maintenance Agreement (SWMA) support contract and would require a per hour billable IBM i Customized Services consulting contract. Please contact IBM Support for further information.

 
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. ©2018 Google LLC All rights reserved. Google and the Google logo are registered trademarks of Google LLC.

[{"Business Unit":{"code":"BU009","label":"Systems - Cognitive"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"Simple Mail Transfer Protocol (SMTP) Client","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.4;7.3;7.2","Edition":""}]

Document Information

Modified date:
18 December 2019

UID

ibm10959599