Question & Answer
Question
Answer
For more information on configuring the IBM i SMTP Client to relay email to Microsoft Office 365, refer to the "Office 365 Configuration with the IBM i SMTP Client" section. For more information on configuring the IBM i SMTP Client to relay email to Google Mail (Gmail), refer to the "Google Mail (Gmail) Configuration with the IBM i SMTP Client" section.
Office 365 Configuration with the IBM i SMTP Client
Refer to Part 2 in the Microsoft techdoc, Set up connectors to route mail between Microsoft 365 or Office 365 and your own email servers, for detailed information on how to create a SMTP connector to configure the IBM i SMTP Client to relay email to Microsoft Office 365. IBM recommends setting up the SMTP connector to authenticate the IBM i SMTP client by IP address. 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 (v=spf1 ip4:<IBMiPublicIPAddress> include:spf.protection.outlook.com -all).
IBM does not advise specifying "smtp.office365.com" as your IBM i SMTP Client Forwarding Mailhub Server (FWDHUBSVR). The IBM i SMTP Forwarding Mailhub Server (FWDHUBSVR) is recommended to be set to the MX endpoint host of your Office365 hosted domain (i.e. mydomain-com.mail.protection.outlook.com).
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(<mydomain-com.mail.protection.outlook.com>) 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. For further information on configuring TLS encryption within your Office365 SMTP connector, please refer to Examples 4 and 5 in the Microsoft document, Set up connectors for secure mail flow with a partner organization.
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.
Related Information
Was this topic helpful?
Document Information
Modified date:
04 June 2021
UID
ibm10959599