IBM Support

IBM i SMTP DNS Records: MX and SPF record check

Troubleshooting


Problem

SMTP DNS Records check and verification.

Resolving The Problem

Important: This technote helps you understand and verify your own DNS infrastructure (MX and SPF) as it relates to SMTP on IBM i. While IBM Technical Support can help you check how IBM i interprets these records and advise on IBM i SMTP/MSF configuration, the creation, maintenance, and accuracy of DNS records is the client’s responsibility (owned by you or your DNS provider). IBM does not modify, host, or administer client DNS.

* We assist in verifying MX/SPF exists (publicly).
* We provide you guidance on how you can check your MX/SPF (if exists).
* We guide alignment of IBM i SMTP settings (e.g., Microsoft 365, Google).

Accurate MX and SPF are critical to mail routing, reputation, and deliverability. Use this document to keep your DNS healthy and aligned with your mail architecture.

Requirements:

5770SS1 – IBM i Operating System

* Option 1 – Extended Base Support (foundation for Extend Base Support).
* Option 3 – Extended Base Directory Support (Extended Base Directory Support).

5770SS1 Option 31- Domain Name System (NSLOOKUP and DIG commands). 
5770SS1 Option 30 - QShell 
5770SS1 Option 33 - PASE for i
5770TC1 TCP/IP Connectivity for i

NOTE: (An Outbound internet connection on the IBM i is required)


1) Purpose & scope

This technote explains MX and SPF DNS records, why they matter for IBM i SMTP health and delivery, and how to validate them directly from IBM i. It complements IBM’s MSF/SMTP configuration and SMTP relay with authentication guidance.


2) What DNS records for MX and SPF?

MX (Mail Exchanger)

MX records indicate which host(s) accept mail for a domain, ordered by preference. SMTP senders look up MX to determine where to deliver messages for a recipient domain as defined in RFC 5321 – Simple Mail Transfer Protocol (Section 5: Address Resolution and Mail Handling).

SPF (Sender Policy Framework)

SPF is a DNS TXT record (beginning with v=spf1) that lists the IPs/hosts authorized to send mail for your domain’s envelope MAIL FROM or HELO/EHLO. SPF is defined by RFC 7208 – Sender Policy Framework (SPF) Version 1. Results such as pass, fail, and softfail influence acceptance and reputation.

Tip: SPF authenticates sender IP authorization; DKIM signs content; DMARC enforces domain policy/reporting. Here are some additional examples of SPF record.
 
v=spf1 ip4:203.0.113.5 -all
# Only this IPv4 address is authorized (hard fail)

v=spf1 include:spf.protection.outlook.com -all
# Microsoft 365 relay only

v=spf1 ip4:198.51.100.44 include:_spf.google.com ~all
# Hybrid: on‑prem static IP + Google Workspace; softfail otherwise

v=spf1 a mx include:_spf.example.net -all
# Authorize A host, MX hosts, and a third‑party relay provider

v=spf1 ip4:192.0.2.10 ip6:2001:db8::10 include:spf.protection.outlook.com -all
# Dual‑stack on‑prem sender + Microsoft 365

v=spf1 include:spf1.provider.com include:spf2.provider.com -all
# Multiple providers — be mindful of 10‑DNS‑lookup limit

 

3) Relation to IBM i SMTP/MSF configuration

* Outbound: Ensure your SPF authorizes your public IPs or your relay provider. If using an O365 connector, set IBM i FWDHUBSVR to your tenant MX endpoint and align SPF.

* Inbound: External senders rely on your MX to find your receiving service; if MX is wrong/missing, mail cannot reach you.

IBM i touchpoints

* CHGSMTPA FWDHUBSVR(<mx-endpoint>) — forwarding mailhub to the proper MX/relay.
* Navigator for i → Network → Servers → TCP/IP → SMTP → Properties — routing & relay settings.
* DNS (registrar/host) — where MX/SPF are published.

Good practice

* MX points to the real receiving service with valid A/AAAA and open TCP 25.
* SPF authorizes your relay/provider and any direct‑sending IPs; keep within 10 DNS lookups. 
* HELO/EHLO hostname is valid and forward‑confirmed.
 

4) Checking MX & SPF from IBM i (PASE/QShell)

Use PASE (CALL QP2TERM) or QShell with nslookup/dig. Prefer a public resolver like Google DNS (8.8.8.8).

PASE / QSHELL

$ CALL QP2TERM [QSH or STRQSH for QShell]
# 8.8.8.8 is public DNS server, you can change this to your local 
$ nslookup -type=MX ibm.com 8.8.8.8 $ nslookup -type=TXT ibm.com 8.8.8.8 | grep -i spf # look for v=spf1 ([i]gnore case)
NOTE: nslookup command has been deprecated. Some systems may not have functional nslookup. You can use dig command (5770SS1 option 31).   
# If dig is installed (bind-utils 5770SS1 Option 31)
# @8.8.8.8 You can change this to your local DNS server.
$ dig +short ibm.com MX @8.8.8.8 $ dig +short ibm.com TXT | grep -i spf @8.8.8.8 (Look for v=SPF1, [i]gnore case)
 
Note: If QShell shows pthread_create(): Resource temporarily unavailable (11), run
ADDENVVAR ENVVAR(QIBM_MULTI_THREADED) VALUE('Y') LEVEL(*JOB) REPLACE(*YES). Restart your QSHell session. Otherwise run in PASE (CALL QP2TERM
 
 

5) Appendix — Handy commands

# Check MX & SPF via Google DNS (PASE)
CALL QP2TERM nslookup -type=MX ibm.com 8.8.8.8 nslookup -type=TXT ibm.com 8.8.8.8
# Other noteable DNS records nslookup -type=A ibm.com 8.8.8.8 nslookup -type=PTR 96.16.247.80 8.8.8.8 # Change/Set your SMTP Forwarding Mailhub Server (On commandline) CHGSMTPA FWDHUBSVR(mydomain-com.mail.protection.outlook.com) CHGSMTPA MAILROUTER(mydomain-com.mail.protection.outlook.com)

 

6) Recommended SMTP fixes (IBM i V7R3 → V7R6)

IBM recommends staying current on the Cumulative package and applying Recommended SMTP Fixes for your release. Use the links below to view the SMTP pages and order PTFs via Fix Central.

IBM i 7.3 — Recommended Fixes: SMTP 
IBM i 7.4 — Recommended Fixes: SMTP 
IBM i 7.5 — Recommended Fixes: SMTP 
IBM i 7.6 — Recommended Fixes: SMTP

For the full, release-wide catalog of recommended fixes, see IBM i Support: Recommended fixes.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000C4BAAU","label":"IBM i"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.4.0;7.5.0;7.6.0"}]

Document Information

Modified date:
02 March 2026

UID

ibm17262231