Overview

Several of our products generate email. When they do so, they pass the email to IBM i's SMTP stack for delivery using IBM's® QtmmSendMail() API. Some of our customers use service providers to handle delivery (aka. forwarding or relaying) of email. Increasingly, email service providers are requiring SMTP Authentication before delivering email. At V6R1M0, IBM i's SMTP stack added support for outbound SMTP Authentication. If you are running V5R4 or earlier, see this companion article for instructions. If your email service provider also requires encrypted communication (SSL/TLS), see this companion article for instructions.

This article describes configuring IBM i for SMTP Authentication. The three key elements required are:

  1. Configuring a forwarding mailhub server.
  2. Configuring IBM i access to DNS servers.
  3. Configuring an SMTP list entry to contain host logon information for the mailhub.

1. Mailhub Server

IBM i can send email to a forwarding mailhub server for delivery. To configure a mailhub, prompt the Change SMTP Attributes (CHGSMTPA) command, page down four times and change the Forwarding mailhub server (FWDHUBSVR) parameter to the name or IP address of the mailhub:

                        Change SMTP Attributes (CHGSMTPA)
                                                                                
Type choices, press Enter.

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 . . . 'smtp.yourprovider.com'









Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys

2. DNS Access

In order to determine the IP address of the mailhub, IBM i must have access to a DNS server. The IP addresses of the DNS servers you should use are supplied by your internet service provider. If for example your service provider supplies DNS servers 192.0.2.1 and 192.0.2.2, prompt the Change TCP/IP Domain (CHGTCPDMN) command and enter the IP addresses.

                        Change TCP/IP Domain (CHGTCPDMN)                        

Type choices, press Enter.

Host name . . . . . . . . . . . 'mailout'

Domain name . . . . . . . . . . 'ofc.widget.com'



Domain search list . . . . . . . *DFT



Host name search priority . . . *LOCAL *REMOTE, *LOCAL, *SAME

Domain name server:
Internet address . . . . . . . '192.0.2.1'
'192.0.2.2'


Bottom
F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel
F13=How to use this display F24=More keys

To verify that IBM i can resolve external names run ping ibm.com. You may or may not receive responses, but you should not receive Unknown host, ibm.com.

If you do not know the IPs to use, a reasonable guess can be retrieved from a PC attached to the local area network that contains the system:


Host Name . . . . . . . . . . . . : PC001
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : ofc.widget.com

Ethernet adapter Widget Net:

Connection-specific DNS Suffix . : ofc.widget.com
Description . . . . . . . . . . . : Broadcom 802.11b/g WLAN
Physical Address. . . . . . . . . : 00-11-22-33-44-55
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.0.2.10
Subnet Mask . . . . . . . . . . . : 255.255.255.192
Default Gateway . . . . . . . . . : 192.0.2.1
DHCP Server . . . . . . . . . . . : 192.0.2.132
DNS Servers . . . . . . . . . . . : 192.0.2.1
192.0.2.2

Lease Obtained. . . . . . . . . . : Sunday, August 21, 2011 4:30:38 PM
Lease Expires . . . . . . . . . . : Monday, August 22, 2011 4:30:38 PM  

C:\Documents and Settings\Programmer>

3. Host Logon Information

When IBM i contacts the mailhub, it logs on with the information in the associate SMTP list entry. To add logon information, prompt the Add SMTP List Entry (ADDSMTPLE) command, enter List type (TYPE) *HOSTAUTH, and press enter.

                        Add SMTP List Entry (ADDSMTPLE)                         

Type choices, press Enter.

List type . . . . . . . . . . . > *HOSTAUTH *ACCEPT, *REJECT, *NEAR...
Host name . . . . . . . . . . . 'smtp.yourprovider.com'



User name . . . . . . . . . . . 'your_user_name'


User password . . . . . . . . . 'your_user_password'







Bottom
F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel
F13=How to use this display F24=More keys

IBM i logs on with this entry when contacting the mailhub.