When using an IBM i SMTP Attribute FWDHUBSVR=*NONE configuration, new SMTP commands are available at IBM i 7.3 OS for the creation and use of IBM i SMTP Distribution Lists. Distributions lists are used to send emails to a group of recipients using a singular email address.
If a FWDHUBSVR value other than *NONE is specified, then all emails are routed to the mail hub server, which prevents the distribution list from being processed by the IBM i.
1) Check your IBM i SMTP Attribute Forwarding Mail hub Server (FWDHUBSVR) value.
If the value is *NONE, IBM i distribution lists are available and will function. If the value of FWDHUBSVR is NOT *NONE and is any other value, then IBM i SMTP Distribution Lists will not function. This is due to the fact that the FWDHUBSVR value instructs the IBM i SMTP Client to forward ALL emails to a specific host/IP address. As a result, the distribution list email address would need to be processed by the Forwarding Mail hub Server and not the IBM i.
CHGSMTPA and prompt with F4 and press F9 to see all attributes.
Forwarding Mail hub Server = *NONE = Yes, you can use IBM i SMTP Distribution Lists
Forwarding Mail hub Server = any other value than *NONE = IBM i SMTP Distribution Lists are not supported.
2) Verify the QIBM_SMTP_FWDSVR_LCL_MAIL environment variable is NOT set at the *SYS level.
Execute the CL command, WRKENVVAR LEVEL(*SYS), to display your current *SYS level environment variables. If the QIBM_SMTP_FWDSVR_LCL_MAIL environment variable is not set, you can proceed to the next step. If the environment variable is set, then you would need to remove this environment variable using the "RMVENVVAR ENVVAR(QIBM_SMTP_FWDSVR_LCL_MAIL) LEVEL(*SYS)" CL command and restart the IBM i SMTP Server.
3) Create a new IBM i distribution list.
Execute the CL command to create a new distribution list.
CRTSDSTL LSTID(ADMINS) LSTD('IBM i Administrators')
https://www.ibm.com/docs/en/i/7.3?topic=ssw_ibm_i_73/cl/crtsdstl.htm
4) Add recipient email addresses to the distribution list.
ADDSDSTLE LSTID(ADMINS)
USRID((quinn@us.ibm.com 'first recipient')
(susan@us.ibm.com 'second recipient'))
https://www.ibm.com/docs/en/i/7.3?topic=ssw_ibm_i_73/cl/addsdstle.htm
This command specifies that two user IDs are added to the distribution list ADMINS. You can also specify the FROMLSTID if there are any existing distribution lists you want to import into the LISTID distribution list specified.
5) Send an email to the distribution list.
SNDSMTPEMM RCP((ADMINS@AS400.IBM.COM)) SUBJECT('DIST LIST') NOTE('Sending an email to the ADMINS distribution list.')
The command will send an email using the ADMINS distribution list at the IBM i Host, AS400.IBM.COM.
ADMINS = Distribution list ID
AS400.IBM.COM = Host.Domain information set in CFGTCP Option 12. Ensure this FQDN TCP/IP hostname is being resolved to a valid IBM i local IP address in the IBM i Local Host Table (CFGTCP Option 10).
[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CINAA2","label":"Email and SMTP->Setup and Configure"}],"ARM Case Number":"TS008035921","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.3.0;7.4.0;and future releases"}]